Read/Write mutex for Extensions map
This commit is contained in:
parent
baff8c1906
commit
becaf43dcb
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named BIG-REQUESTS could be found on on the server.")
|
return xgb.Errorf("No extension named BIG-REQUESTS could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["BIG-REQUESTS"] = reply.MajorOpcode
|
c.Extensions["BIG-REQUESTS"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["BIG-REQUESTS"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["BIG-REQUESTS"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["BIG-REQUESTS"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["BIG-REQUESTS"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +68,8 @@ type EnableCookie struct {
|
||||||
// Enable sends a checked request.
|
// Enable sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling EnableCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling EnableCookie.Reply()
|
||||||
func Enable(c *xgb.Conn) EnableCookie {
|
func Enable(c *xgb.Conn) EnableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["BIG-REQUESTS"]; !ok {
|
if _, ok := c.Extensions["BIG-REQUESTS"]; !ok {
|
||||||
panic("Cannot issue request 'Enable' using the uninitialized extension 'BIG-REQUESTS'. bigreq.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Enable' using the uninitialized extension 'BIG-REQUESTS'. bigreq.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -80,6 +81,8 @@ func Enable(c *xgb.Conn) EnableCookie {
|
||||||
// EnableUnchecked sends an unchecked request.
|
// EnableUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func EnableUnchecked(c *xgb.Conn) EnableCookie {
|
func EnableUnchecked(c *xgb.Conn) EnableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["BIG-REQUESTS"]; !ok {
|
if _, ok := c.Extensions["BIG-REQUESTS"]; !ok {
|
||||||
panic("Cannot issue request 'Enable' using the uninitialized extension 'BIG-REQUESTS'. bigreq.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Enable' using the uninitialized extension 'BIG-REQUESTS'. bigreq.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -134,7 +137,9 @@ func enableRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["BIG-REQUESTS"]
|
buf[b] = c.Extensions["BIG-REQUESTS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
|
|
@ -20,16 +20,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named Composite could be found on on the server.")
|
return xgb.Errorf("No extension named Composite could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["Composite"] = reply.MajorOpcode
|
c.Extensions["Composite"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["Composite"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["Composite"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["Composite"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["Composite"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +74,8 @@ type CreateRegionFromBorderClipCookie struct {
|
||||||
// CreateRegionFromBorderClip sends an unchecked request.
|
// CreateRegionFromBorderClip sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateRegionFromBorderClip(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) CreateRegionFromBorderClipCookie {
|
func CreateRegionFromBorderClip(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) CreateRegionFromBorderClipCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromBorderClip' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromBorderClip' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -86,6 +87,8 @@ func CreateRegionFromBorderClip(c *xgb.Conn, Region xfixes.Region, Window xproto
|
||||||
// CreateRegionFromBorderClipChecked sends a checked request.
|
// CreateRegionFromBorderClipChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateRegionFromBorderClipCookie.Check()
|
// If an error occurs, it can be retrieved using CreateRegionFromBorderClipCookie.Check()
|
||||||
func CreateRegionFromBorderClipChecked(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) CreateRegionFromBorderClipCookie {
|
func CreateRegionFromBorderClipChecked(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) CreateRegionFromBorderClipCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromBorderClip' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromBorderClip' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -107,7 +110,9 @@ func createRegionFromBorderClipRequest(c *xgb.Conn, Region xfixes.Region, Window
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -133,6 +138,8 @@ type GetOverlayWindowCookie struct {
|
||||||
// GetOverlayWindow sends a checked request.
|
// GetOverlayWindow sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetOverlayWindowCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetOverlayWindowCookie.Reply()
|
||||||
func GetOverlayWindow(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie {
|
func GetOverlayWindow(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'GetOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -144,6 +151,8 @@ func GetOverlayWindow(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie
|
||||||
// GetOverlayWindowUnchecked sends an unchecked request.
|
// GetOverlayWindowUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetOverlayWindowUnchecked(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie {
|
func GetOverlayWindowUnchecked(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'GetOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -201,7 +210,9 @@ func getOverlayWindowRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -224,6 +235,8 @@ type NameWindowPixmapCookie struct {
|
||||||
// NameWindowPixmap sends an unchecked request.
|
// NameWindowPixmap sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func NameWindowPixmap(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) NameWindowPixmapCookie {
|
func NameWindowPixmap(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) NameWindowPixmapCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'NameWindowPixmap' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'NameWindowPixmap' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -235,6 +248,8 @@ func NameWindowPixmap(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) N
|
||||||
// NameWindowPixmapChecked sends a checked request.
|
// NameWindowPixmapChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using NameWindowPixmapCookie.Check()
|
// If an error occurs, it can be retrieved using NameWindowPixmapCookie.Check()
|
||||||
func NameWindowPixmapChecked(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) NameWindowPixmapCookie {
|
func NameWindowPixmapChecked(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) NameWindowPixmapCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'NameWindowPixmap' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'NameWindowPixmap' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -256,7 +271,9 @@ func nameWindowPixmapRequest(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pi
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -282,6 +299,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -293,6 +312,8 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -354,7 +375,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -380,6 +403,8 @@ type RedirectSubwindowsCookie struct {
|
||||||
// RedirectSubwindows sends an unchecked request.
|
// RedirectSubwindows sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func RedirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) RedirectSubwindowsCookie {
|
func RedirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) RedirectSubwindowsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'RedirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RedirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -391,6 +416,8 @@ func RedirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) Redirect
|
||||||
// RedirectSubwindowsChecked sends a checked request.
|
// RedirectSubwindowsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using RedirectSubwindowsCookie.Check()
|
// If an error occurs, it can be retrieved using RedirectSubwindowsCookie.Check()
|
||||||
func RedirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectSubwindowsCookie {
|
func RedirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectSubwindowsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'RedirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RedirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -412,7 +439,9 @@ func redirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte) [
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -440,6 +469,8 @@ type RedirectWindowCookie struct {
|
||||||
// RedirectWindow sends an unchecked request.
|
// RedirectWindow sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func RedirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWindowCookie {
|
func RedirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'RedirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RedirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -451,6 +482,8 @@ func RedirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWind
|
||||||
// RedirectWindowChecked sends a checked request.
|
// RedirectWindowChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using RedirectWindowCookie.Check()
|
// If an error occurs, it can be retrieved using RedirectWindowCookie.Check()
|
||||||
func RedirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWindowCookie {
|
func RedirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'RedirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RedirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -472,7 +505,9 @@ func redirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byt
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -500,6 +535,8 @@ type ReleaseOverlayWindowCookie struct {
|
||||||
// ReleaseOverlayWindow sends an unchecked request.
|
// ReleaseOverlayWindow sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ReleaseOverlayWindow(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindowCookie {
|
func ReleaseOverlayWindow(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'ReleaseOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ReleaseOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -511,6 +548,8 @@ func ReleaseOverlayWindow(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindo
|
||||||
// ReleaseOverlayWindowChecked sends a checked request.
|
// ReleaseOverlayWindowChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ReleaseOverlayWindowCookie.Check()
|
// If an error occurs, it can be retrieved using ReleaseOverlayWindowCookie.Check()
|
||||||
func ReleaseOverlayWindowChecked(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindowCookie {
|
func ReleaseOverlayWindowChecked(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'ReleaseOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ReleaseOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -532,7 +571,9 @@ func releaseOverlayWindowRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -555,6 +596,8 @@ type UnredirectSubwindowsCookie struct {
|
||||||
// UnredirectSubwindows sends an unchecked request.
|
// UnredirectSubwindows sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func UnredirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectSubwindowsCookie {
|
func UnredirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectSubwindowsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'UnredirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnredirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -566,6 +609,8 @@ func UnredirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) Unredi
|
||||||
// UnredirectSubwindowsChecked sends a checked request.
|
// UnredirectSubwindowsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using UnredirectSubwindowsCookie.Check()
|
// If an error occurs, it can be retrieved using UnredirectSubwindowsCookie.Check()
|
||||||
func UnredirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectSubwindowsCookie {
|
func UnredirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectSubwindowsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'UnredirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnredirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -587,7 +632,9 @@ func unredirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -615,6 +662,8 @@ type UnredirectWindowCookie struct {
|
||||||
// UnredirectWindow sends an unchecked request.
|
// UnredirectWindow sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func UnredirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectWindowCookie {
|
func UnredirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'UnredirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnredirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -626,6 +675,8 @@ func UnredirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) Unredirect
|
||||||
// UnredirectWindowChecked sends a checked request.
|
// UnredirectWindowChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using UnredirectWindowCookie.Check()
|
// If an error occurs, it can be retrieved using UnredirectWindowCookie.Check()
|
||||||
func UnredirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectWindowCookie {
|
func UnredirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Composite"]; !ok {
|
if _, ok := c.Extensions["Composite"]; !ok {
|
||||||
panic("Cannot issue request 'UnredirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnredirectWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -647,7 +698,9 @@ func unredirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []b
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Composite"]
|
buf[b] = c.Extensions["Composite"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
|
|
@ -20,16 +20,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named DAMAGE could be found on on the server.")
|
return xgb.Errorf("No extension named DAMAGE could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["DAMAGE"] = reply.MajorOpcode
|
c.Extensions["DAMAGE"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["DAMAGE"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["DAMAGE"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["DAMAGE"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["DAMAGE"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,6 +234,8 @@ type AddCookie struct {
|
||||||
// Add sends an unchecked request.
|
// Add sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Add(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie {
|
func Add(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Add' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Add' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -246,6 +247,8 @@ func Add(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie
|
||||||
// AddChecked sends a checked request.
|
// AddChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using AddCookie.Check()
|
// If an error occurs, it can be retrieved using AddCookie.Check()
|
||||||
func AddChecked(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie {
|
func AddChecked(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Add' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Add' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -267,7 +270,9 @@ func addRequest(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) []b
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DAMAGE"]
|
buf[b] = c.Extensions["DAMAGE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -293,6 +298,8 @@ type CreateCookie struct {
|
||||||
// Create sends an unchecked request.
|
// Create sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Create(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie {
|
func Create(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Create' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Create' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -304,6 +311,8 @@ func Create(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) Cr
|
||||||
// CreateChecked sends a checked request.
|
// CreateChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateCookie.Check()
|
// If an error occurs, it can be retrieved using CreateCookie.Check()
|
||||||
func CreateChecked(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie {
|
func CreateChecked(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Create' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Create' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -325,7 +334,9 @@ func createRequest(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level b
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DAMAGE"]
|
buf[b] = c.Extensions["DAMAGE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -356,6 +367,8 @@ type DestroyCookie struct {
|
||||||
// Destroy sends an unchecked request.
|
// Destroy sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Destroy(c *xgb.Conn, Damage Damage) DestroyCookie {
|
func Destroy(c *xgb.Conn, Damage Damage) DestroyCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Destroy' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Destroy' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -367,6 +380,8 @@ func Destroy(c *xgb.Conn, Damage Damage) DestroyCookie {
|
||||||
// DestroyChecked sends a checked request.
|
// DestroyChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroyCookie.Check()
|
// If an error occurs, it can be retrieved using DestroyCookie.Check()
|
||||||
func DestroyChecked(c *xgb.Conn, Damage Damage) DestroyCookie {
|
func DestroyChecked(c *xgb.Conn, Damage Damage) DestroyCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Destroy' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Destroy' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -388,7 +403,9 @@ func destroyRequest(c *xgb.Conn, Damage Damage) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DAMAGE"]
|
buf[b] = c.Extensions["DAMAGE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -411,6 +428,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -422,6 +441,8 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -483,7 +504,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DAMAGE"]
|
buf[b] = c.Extensions["DAMAGE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -509,6 +532,8 @@ type SubtractCookie struct {
|
||||||
// Subtract sends an unchecked request.
|
// Subtract sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Subtract(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie {
|
func Subtract(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Subtract' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Subtract' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -520,6 +545,8 @@ func Subtract(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Reg
|
||||||
// SubtractChecked sends a checked request.
|
// SubtractChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SubtractCookie.Check()
|
// If an error occurs, it can be retrieved using SubtractCookie.Check()
|
||||||
func SubtractChecked(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie {
|
func SubtractChecked(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
if _, ok := c.Extensions["DAMAGE"]; !ok {
|
||||||
panic("Cannot issue request 'Subtract' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Subtract' using the uninitialized extension 'DAMAGE'. damage.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -541,7 +568,9 @@ func subtractRequest(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfi
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DAMAGE"]
|
buf[b] = c.Extensions["DAMAGE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named DPMS could be found on on the server.")
|
return xgb.Errorf("No extension named DPMS could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["DPMS"] = reply.MajorOpcode
|
c.Extensions["DPMS"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["DPMS"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["DPMS"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["DPMS"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["DPMS"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +75,8 @@ type CapableCookie struct {
|
||||||
// Capable sends a checked request.
|
// Capable sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CapableCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CapableCookie.Reply()
|
||||||
func Capable(c *xgb.Conn) CapableCookie {
|
func Capable(c *xgb.Conn) CapableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Capable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Capable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -87,6 +88,8 @@ func Capable(c *xgb.Conn) CapableCookie {
|
||||||
// CapableUnchecked sends an unchecked request.
|
// CapableUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CapableUnchecked(c *xgb.Conn) CapableCookie {
|
func CapableUnchecked(c *xgb.Conn) CapableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Capable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Capable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -148,7 +151,9 @@ func capableRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -168,6 +173,8 @@ type DisableCookie struct {
|
||||||
// Disable sends an unchecked request.
|
// Disable sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Disable(c *xgb.Conn) DisableCookie {
|
func Disable(c *xgb.Conn) DisableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Disable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Disable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -179,6 +186,8 @@ func Disable(c *xgb.Conn) DisableCookie {
|
||||||
// DisableChecked sends a checked request.
|
// DisableChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DisableCookie.Check()
|
// If an error occurs, it can be retrieved using DisableCookie.Check()
|
||||||
func DisableChecked(c *xgb.Conn) DisableCookie {
|
func DisableChecked(c *xgb.Conn) DisableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Disable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Disable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -200,7 +209,9 @@ func disableRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -220,6 +231,8 @@ type EnableCookie struct {
|
||||||
// Enable sends an unchecked request.
|
// Enable sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Enable(c *xgb.Conn) EnableCookie {
|
func Enable(c *xgb.Conn) EnableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Enable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Enable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -231,6 +244,8 @@ func Enable(c *xgb.Conn) EnableCookie {
|
||||||
// EnableChecked sends a checked request.
|
// EnableChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using EnableCookie.Check()
|
// If an error occurs, it can be retrieved using EnableCookie.Check()
|
||||||
func EnableChecked(c *xgb.Conn) EnableCookie {
|
func EnableChecked(c *xgb.Conn) EnableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Enable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Enable' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -252,7 +267,9 @@ func enableRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -272,6 +289,8 @@ type ForceLevelCookie struct {
|
||||||
// ForceLevel sends an unchecked request.
|
// ForceLevel sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ForceLevel(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie {
|
func ForceLevel(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'ForceLevel' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ForceLevel' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -283,6 +302,8 @@ func ForceLevel(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie {
|
||||||
// ForceLevelChecked sends a checked request.
|
// ForceLevelChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ForceLevelCookie.Check()
|
// If an error occurs, it can be retrieved using ForceLevelCookie.Check()
|
||||||
func ForceLevelChecked(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie {
|
func ForceLevelChecked(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'ForceLevel' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ForceLevel' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -304,7 +325,9 @@ func forceLevelRequest(c *xgb.Conn, PowerLevel uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -327,6 +350,8 @@ type GetTimeoutsCookie struct {
|
||||||
// GetTimeouts sends a checked request.
|
// GetTimeouts sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetTimeoutsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetTimeoutsCookie.Reply()
|
||||||
func GetTimeouts(c *xgb.Conn) GetTimeoutsCookie {
|
func GetTimeouts(c *xgb.Conn) GetTimeoutsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'GetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -338,6 +363,8 @@ func GetTimeouts(c *xgb.Conn) GetTimeoutsCookie {
|
||||||
// GetTimeoutsUnchecked sends an unchecked request.
|
// GetTimeoutsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetTimeoutsUnchecked(c *xgb.Conn) GetTimeoutsCookie {
|
func GetTimeoutsUnchecked(c *xgb.Conn) GetTimeoutsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'GetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -403,7 +430,9 @@ func getTimeoutsRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -423,6 +452,8 @@ type GetVersionCookie struct {
|
||||||
// GetVersion sends a checked request.
|
// GetVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
|
||||||
func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -434,6 +465,8 @@ func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint1
|
||||||
// GetVersionUnchecked sends an unchecked request.
|
// GetVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -492,7 +525,9 @@ func getVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersio
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -518,6 +553,8 @@ type InfoCookie struct {
|
||||||
// Info sends a checked request.
|
// Info sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling InfoCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling InfoCookie.Reply()
|
||||||
func Info(c *xgb.Conn) InfoCookie {
|
func Info(c *xgb.Conn) InfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Info' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Info' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -529,6 +566,8 @@ func Info(c *xgb.Conn) InfoCookie {
|
||||||
// InfoUnchecked sends an unchecked request.
|
// InfoUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func InfoUnchecked(c *xgb.Conn) InfoCookie {
|
func InfoUnchecked(c *xgb.Conn) InfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'Info' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Info' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -594,7 +633,9 @@ func infoRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -614,6 +655,8 @@ type SetTimeoutsCookie struct {
|
||||||
// SetTimeouts sends an unchecked request.
|
// SetTimeouts sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetTimeouts(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie {
|
func SetTimeouts(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'SetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -625,6 +668,8 @@ func SetTimeouts(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffT
|
||||||
// SetTimeoutsChecked sends a checked request.
|
// SetTimeoutsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetTimeoutsCookie.Check()
|
// If an error occurs, it can be retrieved using SetTimeoutsCookie.Check()
|
||||||
func SetTimeoutsChecked(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie {
|
func SetTimeoutsChecked(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DPMS"]; !ok {
|
if _, ok := c.Extensions["DPMS"]; !ok {
|
||||||
panic("Cannot issue request 'SetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetTimeouts' using the uninitialized extension 'DPMS'. dpms.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -646,7 +691,9 @@ func setTimeoutsRequest(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint1
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DPMS"]
|
buf[b] = c.Extensions["DPMS"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named DRI2 could be found on on the server.")
|
return xgb.Errorf("No extension named DRI2 could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["DRI2"] = reply.MajorOpcode
|
c.Extensions["DRI2"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["DRI2"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["DRI2"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["DRI2"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["DRI2"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,6 +401,8 @@ type AuthenticateCookie struct {
|
||||||
// Authenticate sends a checked request.
|
// Authenticate sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling AuthenticateCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling AuthenticateCookie.Reply()
|
||||||
func Authenticate(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie {
|
func Authenticate(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'Authenticate' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Authenticate' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -413,6 +414,8 @@ func Authenticate(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateC
|
||||||
// AuthenticateUnchecked sends an unchecked request.
|
// AuthenticateUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func AuthenticateUnchecked(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie {
|
func AuthenticateUnchecked(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'Authenticate' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Authenticate' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -467,7 +470,9 @@ func authenticateRequest(c *xgb.Conn, Window xproto.Window, Magic uint32) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -493,6 +498,8 @@ type ConnectCookie struct {
|
||||||
// Connect sends a checked request.
|
// Connect sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling ConnectCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling ConnectCookie.Reply()
|
||||||
func Connect(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie {
|
func Connect(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'Connect' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Connect' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -504,6 +511,8 @@ func Connect(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie
|
||||||
// ConnectUnchecked sends an unchecked request.
|
// ConnectUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ConnectUnchecked(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie {
|
func ConnectUnchecked(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'Connect' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Connect' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -586,7 +595,9 @@ func connectRequest(c *xgb.Conn, Window xproto.Window, DriverType uint32) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -612,6 +623,8 @@ type CopyRegionCookie struct {
|
||||||
// CopyRegion sends a checked request.
|
// CopyRegion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CopyRegionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CopyRegionCookie.Reply()
|
||||||
func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie {
|
func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -623,6 +636,8 @@ func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint3
|
||||||
// CopyRegionUnchecked sends an unchecked request.
|
// CopyRegionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CopyRegionUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie {
|
func CopyRegionUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -673,7 +688,9 @@ func copyRegionRequest(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Des
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -705,6 +722,8 @@ type CreateDrawableCookie struct {
|
||||||
// CreateDrawable sends an unchecked request.
|
// CreateDrawable sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateDrawable(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie {
|
func CreateDrawable(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -716,6 +735,8 @@ func CreateDrawable(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie
|
||||||
// CreateDrawableChecked sends a checked request.
|
// CreateDrawableChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateDrawableCookie.Check()
|
// If an error occurs, it can be retrieved using CreateDrawableCookie.Check()
|
||||||
func CreateDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie {
|
func CreateDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -737,7 +758,9 @@ func createDrawableRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -760,6 +783,8 @@ type DestroyDrawableCookie struct {
|
||||||
// DestroyDrawable sends an unchecked request.
|
// DestroyDrawable sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DestroyDrawable(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie {
|
func DestroyDrawable(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -771,6 +796,8 @@ func DestroyDrawable(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCooki
|
||||||
// DestroyDrawableChecked sends a checked request.
|
// DestroyDrawableChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check()
|
// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check()
|
||||||
func DestroyDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie {
|
func DestroyDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -792,7 +819,9 @@ func destroyDrawableRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -815,6 +844,8 @@ type GetBuffersCookie struct {
|
||||||
// GetBuffers sends a checked request.
|
// GetBuffers sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetBuffersCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetBuffersCookie.Reply()
|
||||||
func GetBuffers(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie {
|
func GetBuffers(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -826,6 +857,8 @@ func GetBuffers(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments
|
||||||
// GetBuffersUnchecked sends an unchecked request.
|
// GetBuffersUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie {
|
func GetBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -895,7 +928,9 @@ func getBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Atta
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -926,6 +961,8 @@ type GetBuffersWithFormatCookie struct {
|
||||||
// GetBuffersWithFormat sends a checked request.
|
// GetBuffersWithFormat sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetBuffersWithFormatCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetBuffersWithFormatCookie.Reply()
|
||||||
func GetBuffersWithFormat(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie {
|
func GetBuffersWithFormat(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetBuffersWithFormat' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetBuffersWithFormat' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -937,6 +974,8 @@ func GetBuffersWithFormat(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, A
|
||||||
// GetBuffersWithFormatUnchecked sends an unchecked request.
|
// GetBuffersWithFormatUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetBuffersWithFormatUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie {
|
func GetBuffersWithFormatUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetBuffersWithFormat' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetBuffersWithFormat' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1006,7 +1045,9 @@ func getBuffersWithFormatRequest(c *xgb.Conn, Drawable xproto.Drawable, Count ui
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -1034,6 +1075,8 @@ type GetMSCCookie struct {
|
||||||
// GetMSC sends a checked request.
|
// GetMSC sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetMSCCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetMSCCookie.Reply()
|
||||||
func GetMSC(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie {
|
func GetMSC(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1045,6 +1088,8 @@ func GetMSC(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie {
|
||||||
// GetMSCUnchecked sends an unchecked request.
|
// GetMSCUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie {
|
func GetMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1119,7 +1164,9 @@ func getMSCRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 9 // request opcode
|
buf[b] = 9 // request opcode
|
||||||
|
@ -1142,6 +1189,8 @@ type GetParamCookie struct {
|
||||||
// GetParam sends a checked request.
|
// GetParam sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetParamCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetParamCookie.Reply()
|
||||||
func GetParam(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie {
|
func GetParam(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetParam' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetParam' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1153,6 +1202,8 @@ func GetParam(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCooki
|
||||||
// GetParamUnchecked sends an unchecked request.
|
// GetParamUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetParamUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie {
|
func GetParamUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'GetParam' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetParam' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1216,7 +1267,9 @@ func getParamRequest(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 13 // request opcode
|
buf[b] = 13 // request opcode
|
||||||
|
@ -1242,6 +1295,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1253,6 +1308,8 @@ func QueryVersion(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVe
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1311,7 +1368,9 @@ func queryVersionRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -1337,6 +1396,8 @@ type SwapBuffersCookie struct {
|
||||||
// SwapBuffers sends a checked request.
|
// SwapBuffers sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling SwapBuffersCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling SwapBuffersCookie.Reply()
|
||||||
func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie {
|
func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'SwapBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwapBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1348,6 +1409,8 @@ func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, Targ
|
||||||
// SwapBuffersUnchecked sends an unchecked request.
|
// SwapBuffersUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SwapBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie {
|
func SwapBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'SwapBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwapBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1406,7 +1469,9 @@ func swapBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint3
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -1447,6 +1512,8 @@ type SwapIntervalCookie struct {
|
||||||
// SwapInterval sends an unchecked request.
|
// SwapInterval sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SwapInterval(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie {
|
func SwapInterval(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'SwapInterval' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwapInterval' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1458,6 +1525,8 @@ func SwapInterval(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIn
|
||||||
// SwapIntervalChecked sends a checked request.
|
// SwapIntervalChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SwapIntervalCookie.Check()
|
// If an error occurs, it can be retrieved using SwapIntervalCookie.Check()
|
||||||
func SwapIntervalChecked(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie {
|
func SwapIntervalChecked(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'SwapInterval' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwapInterval' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1479,7 +1548,9 @@ func swapIntervalRequest(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 12 // request opcode
|
buf[b] = 12 // request opcode
|
||||||
|
@ -1505,6 +1576,8 @@ type WaitMSCCookie struct {
|
||||||
// WaitMSC sends a checked request.
|
// WaitMSC sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling WaitMSCCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling WaitMSCCookie.Reply()
|
||||||
func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie {
|
func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'WaitMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'WaitMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1516,6 +1589,8 @@ func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMs
|
||||||
// WaitMSCUnchecked sends an unchecked request.
|
// WaitMSCUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func WaitMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie {
|
func WaitMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'WaitMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'WaitMSC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1590,7 +1665,9 @@ func waitMSCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, T
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -1631,6 +1708,8 @@ type WaitSBCCookie struct {
|
||||||
// WaitSBC sends a checked request.
|
// WaitSBC sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling WaitSBCCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling WaitSBCCookie.Reply()
|
||||||
func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie {
|
func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'WaitSBC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'WaitSBC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1642,6 +1721,8 @@ func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSb
|
||||||
// WaitSBCUnchecked sends an unchecked request.
|
// WaitSBCUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func WaitSBCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie {
|
func WaitSBCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["DRI2"]; !ok {
|
if _, ok := c.Extensions["DRI2"]; !ok {
|
||||||
panic("Cannot issue request 'WaitSBC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
panic("Cannot issue request 'WaitSBC' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1716,7 +1797,9 @@ func waitSBCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, T
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["DRI2"]
|
buf[b] = c.Extensions["DRI2"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named Generic Event Extension could be found on on the server.")
|
return xgb.Errorf("No extension named Generic Event Extension could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["Generic Event Extension"] = reply.MajorOpcode
|
c.Extensions["Generic Event Extension"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["Generic Event Extension"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["Generic Event Extension"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["Generic Event Extension"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["Generic Event Extension"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +68,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// 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 {
|
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Generic Event Extension"]; !ok {
|
if _, ok := c.Extensions["Generic Event Extension"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Generic Event Extension'. ge.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Generic Event Extension'. ge.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -80,6 +81,8 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uin
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// 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 {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["Generic Event Extension"]; !ok {
|
if _, ok := c.Extensions["Generic Event Extension"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Generic Event Extension'. ge.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Generic Event Extension'. ge.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -141,7 +144,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVers
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["Generic Event Extension"]
|
buf[b] = c.Extensions["Generic Event Extension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
|
605
nexgb/glx/glx.go
605
nexgb/glx/glx.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named RECORD could be found on on the server.")
|
return xgb.Errorf("No extension named RECORD could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["RECORD"] = reply.MajorOpcode
|
c.Extensions["RECORD"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["RECORD"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["RECORD"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["RECORD"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["RECORD"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,6 +522,8 @@ type CreateContextCookie struct {
|
||||||
// CreateContext sends an unchecked request.
|
// CreateContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateContext(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie {
|
func CreateContext(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -534,6 +535,8 @@ func CreateContext(c *xgb.Conn, Context Context, ElementHeader ElementHeader, Nu
|
||||||
// CreateContextChecked sends a checked request.
|
// CreateContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateContextCookie.Check()
|
// If an error occurs, it can be retrieved using CreateContextCookie.Check()
|
||||||
func CreateContextChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie {
|
func CreateContextChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -555,7 +558,9 @@ func createContextRequest(c *xgb.Conn, Context Context, ElementHeader ElementHea
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -600,6 +605,8 @@ type DisableContextCookie struct {
|
||||||
// DisableContext sends an unchecked request.
|
// DisableContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DisableContext(c *xgb.Conn, Context Context) DisableContextCookie {
|
func DisableContext(c *xgb.Conn, Context Context) DisableContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'DisableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DisableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -611,6 +618,8 @@ func DisableContext(c *xgb.Conn, Context Context) DisableContextCookie {
|
||||||
// DisableContextChecked sends a checked request.
|
// DisableContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DisableContextCookie.Check()
|
// If an error occurs, it can be retrieved using DisableContextCookie.Check()
|
||||||
func DisableContextChecked(c *xgb.Conn, Context Context) DisableContextCookie {
|
func DisableContextChecked(c *xgb.Conn, Context Context) DisableContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'DisableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DisableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -632,7 +641,9 @@ func disableContextRequest(c *xgb.Conn, Context Context) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -655,6 +666,8 @@ type EnableContextCookie struct {
|
||||||
// EnableContext sends a checked request.
|
// EnableContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling EnableContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling EnableContextCookie.Reply()
|
||||||
func EnableContext(c *xgb.Conn, Context Context) EnableContextCookie {
|
func EnableContext(c *xgb.Conn, Context Context) EnableContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'EnableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'EnableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -666,6 +679,8 @@ func EnableContext(c *xgb.Conn, Context Context) EnableContextCookie {
|
||||||
// EnableContextUnchecked sends an unchecked request.
|
// EnableContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func EnableContextUnchecked(c *xgb.Conn, Context Context) EnableContextCookie {
|
func EnableContextUnchecked(c *xgb.Conn, Context Context) EnableContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'EnableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'EnableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -752,7 +767,9 @@ func enableContextRequest(c *xgb.Conn, Context Context) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -775,6 +792,8 @@ type FreeContextCookie struct {
|
||||||
// FreeContext sends an unchecked request.
|
// FreeContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func FreeContext(c *xgb.Conn, Context Context) FreeContextCookie {
|
func FreeContext(c *xgb.Conn, Context Context) FreeContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'FreeContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreeContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -786,6 +805,8 @@ func FreeContext(c *xgb.Conn, Context Context) FreeContextCookie {
|
||||||
// FreeContextChecked sends a checked request.
|
// FreeContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using FreeContextCookie.Check()
|
// If an error occurs, it can be retrieved using FreeContextCookie.Check()
|
||||||
func FreeContextChecked(c *xgb.Conn, Context Context) FreeContextCookie {
|
func FreeContextChecked(c *xgb.Conn, Context Context) FreeContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'FreeContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreeContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -807,7 +828,9 @@ func freeContextRequest(c *xgb.Conn, Context Context) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -830,6 +853,8 @@ type GetContextCookie struct {
|
||||||
// GetContext sends a checked request.
|
// GetContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetContextCookie.Reply()
|
||||||
func GetContext(c *xgb.Conn, Context Context) GetContextCookie {
|
func GetContext(c *xgb.Conn, Context Context) GetContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'GetContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -841,6 +866,8 @@ func GetContext(c *xgb.Conn, Context Context) GetContextCookie {
|
||||||
// GetContextUnchecked sends an unchecked request.
|
// GetContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetContextUnchecked(c *xgb.Conn, Context Context) GetContextCookie {
|
func GetContextUnchecked(c *xgb.Conn, Context Context) GetContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'GetContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -914,7 +941,9 @@ func getContextRequest(c *xgb.Conn, Context Context) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -937,6 +966,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -948,6 +979,8 @@ func QueryVersion(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16) QueryVe
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1006,7 +1039,9 @@ func queryVersionRequest(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -1032,6 +1067,8 @@ type RegisterClientsCookie struct {
|
||||||
// RegisterClients sends an unchecked request.
|
// RegisterClients sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func RegisterClients(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie {
|
func RegisterClients(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'RegisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RegisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1043,6 +1080,8 @@ func RegisterClients(c *xgb.Conn, Context Context, ElementHeader ElementHeader,
|
||||||
// RegisterClientsChecked sends a checked request.
|
// RegisterClientsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using RegisterClientsCookie.Check()
|
// If an error occurs, it can be retrieved using RegisterClientsCookie.Check()
|
||||||
func RegisterClientsChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie {
|
func RegisterClientsChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'RegisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RegisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1064,7 +1103,9 @@ func registerClientsRequest(c *xgb.Conn, Context Context, ElementHeader ElementH
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -1109,6 +1150,8 @@ type UnregisterClientsCookie struct {
|
||||||
// UnregisterClients sends an unchecked request.
|
// UnregisterClients sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func UnregisterClients(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) UnregisterClientsCookie {
|
func UnregisterClients(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) UnregisterClientsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'UnregisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnregisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1120,6 +1163,8 @@ func UnregisterClients(c *xgb.Conn, Context Context, NumClientSpecs uint32, Clie
|
||||||
// UnregisterClientsChecked sends a checked request.
|
// UnregisterClientsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using UnregisterClientsCookie.Check()
|
// If an error occurs, it can be retrieved using UnregisterClientsCookie.Check()
|
||||||
func UnregisterClientsChecked(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) UnregisterClientsCookie {
|
func UnregisterClientsChecked(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) UnregisterClientsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RECORD"]; !ok {
|
if _, ok := c.Extensions["RECORD"]; !ok {
|
||||||
panic("Cannot issue request 'UnregisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnregisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1141,7 +1186,9 @@ func unregisterClientsRequest(c *xgb.Conn, Context Context, NumClientSpecs uint3
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RECORD"]
|
buf[b] = c.Extensions["RECORD"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named RENDER could be found on on the server.")
|
return xgb.Errorf("No extension named RENDER could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["RENDER"] = reply.MajorOpcode
|
c.Extensions["RENDER"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["RENDER"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["RENDER"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["RENDER"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["RENDER"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1582,6 +1581,8 @@ type AddGlyphsCookie struct {
|
||||||
// AddGlyphs sends an unchecked request.
|
// AddGlyphs sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func AddGlyphs(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []Glyphinfo, Data []byte) AddGlyphsCookie {
|
func AddGlyphs(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []Glyphinfo, Data []byte) AddGlyphsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'AddGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AddGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1593,6 +1594,8 @@ func AddGlyphs(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint
|
||||||
// AddGlyphsChecked sends a checked request.
|
// AddGlyphsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using AddGlyphsCookie.Check()
|
// If an error occurs, it can be retrieved using AddGlyphsCookie.Check()
|
||||||
func AddGlyphsChecked(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []Glyphinfo, Data []byte) AddGlyphsCookie {
|
func AddGlyphsChecked(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []Glyphinfo, Data []byte) AddGlyphsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'AddGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AddGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1614,7 +1617,9 @@ func addGlyphsRequest(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 20 // request opcode
|
buf[b] = 20 // request opcode
|
||||||
|
@ -1654,6 +1659,8 @@ type AddTrapsCookie struct {
|
||||||
// AddTraps sends an unchecked request.
|
// AddTraps sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func AddTraps(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap) AddTrapsCookie {
|
func AddTraps(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap) AddTrapsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'AddTraps' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AddTraps' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1665,6 +1672,8 @@ func AddTraps(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap
|
||||||
// AddTrapsChecked sends a checked request.
|
// AddTrapsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using AddTrapsCookie.Check()
|
// If an error occurs, it can be retrieved using AddTrapsCookie.Check()
|
||||||
func AddTrapsChecked(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap) AddTrapsCookie {
|
func AddTrapsChecked(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap) AddTrapsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'AddTraps' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AddTraps' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1686,7 +1695,9 @@ func addTrapsRequest(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 32 // request opcode
|
buf[b] = 32 // request opcode
|
||||||
|
@ -1717,6 +1728,8 @@ type ChangePictureCookie struct {
|
||||||
// ChangePicture sends an unchecked request.
|
// ChangePicture sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ChangePicture(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) ChangePictureCookie {
|
func ChangePicture(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) ChangePictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'ChangePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1728,6 +1741,8 @@ func ChangePicture(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []u
|
||||||
// ChangePictureChecked sends a checked request.
|
// ChangePictureChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ChangePictureCookie.Check()
|
// If an error occurs, it can be retrieved using ChangePictureCookie.Check()
|
||||||
func ChangePictureChecked(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) ChangePictureCookie {
|
func ChangePictureChecked(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) ChangePictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'ChangePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1749,7 +1764,9 @@ func changePictureRequest(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueL
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -1780,6 +1797,8 @@ type CompositeCookie struct {
|
||||||
// Composite sends an unchecked request.
|
// Composite sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Composite(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) CompositeCookie {
|
func Composite(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) CompositeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'Composite' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Composite' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1791,6 +1810,8 @@ func Composite(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, Src
|
||||||
// CompositeChecked sends a checked request.
|
// CompositeChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CompositeCookie.Check()
|
// If an error occurs, it can be retrieved using CompositeCookie.Check()
|
||||||
func CompositeChecked(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) CompositeCookie {
|
func CompositeChecked(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) CompositeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'Composite' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Composite' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1812,7 +1833,9 @@ func compositeRequest(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Pictu
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -1870,6 +1893,8 @@ type CompositeGlyphs16Cookie struct {
|
||||||
// CompositeGlyphs16 sends an unchecked request.
|
// CompositeGlyphs16 sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CompositeGlyphs16(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie {
|
func CompositeGlyphs16(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CompositeGlyphs16' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompositeGlyphs16' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1881,6 +1906,8 @@ func CompositeGlyphs16(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskForma
|
||||||
// CompositeGlyphs16Checked sends a checked request.
|
// CompositeGlyphs16Checked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CompositeGlyphs16Cookie.Check()
|
// If an error occurs, it can be retrieved using CompositeGlyphs16Cookie.Check()
|
||||||
func CompositeGlyphs16Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie {
|
func CompositeGlyphs16Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CompositeGlyphs16' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompositeGlyphs16' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1902,7 +1929,9 @@ func compositeGlyphs16Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, Ma
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 24 // request opcode
|
buf[b] = 24 // request opcode
|
||||||
|
@ -1948,6 +1977,8 @@ type CompositeGlyphs32Cookie struct {
|
||||||
// CompositeGlyphs32 sends an unchecked request.
|
// CompositeGlyphs32 sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CompositeGlyphs32(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie {
|
func CompositeGlyphs32(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CompositeGlyphs32' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompositeGlyphs32' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1959,6 +1990,8 @@ func CompositeGlyphs32(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskForma
|
||||||
// CompositeGlyphs32Checked sends a checked request.
|
// CompositeGlyphs32Checked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CompositeGlyphs32Cookie.Check()
|
// If an error occurs, it can be retrieved using CompositeGlyphs32Cookie.Check()
|
||||||
func CompositeGlyphs32Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie {
|
func CompositeGlyphs32Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CompositeGlyphs32' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompositeGlyphs32' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1980,7 +2013,9 @@ func compositeGlyphs32Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, Ma
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 25 // request opcode
|
buf[b] = 25 // request opcode
|
||||||
|
@ -2026,6 +2061,8 @@ type CompositeGlyphs8Cookie struct {
|
||||||
// CompositeGlyphs8 sends an unchecked request.
|
// CompositeGlyphs8 sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CompositeGlyphs8(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie {
|
func CompositeGlyphs8(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CompositeGlyphs8' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompositeGlyphs8' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2037,6 +2074,8 @@ func CompositeGlyphs8(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat
|
||||||
// CompositeGlyphs8Checked sends a checked request.
|
// CompositeGlyphs8Checked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CompositeGlyphs8Cookie.Check()
|
// If an error occurs, it can be retrieved using CompositeGlyphs8Cookie.Check()
|
||||||
func CompositeGlyphs8Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie {
|
func CompositeGlyphs8Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CompositeGlyphs8' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompositeGlyphs8' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2058,7 +2097,9 @@ func compositeGlyphs8Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, Mas
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 23 // request opcode
|
buf[b] = 23 // request opcode
|
||||||
|
@ -2104,6 +2145,8 @@ type CreateAnimCursorCookie struct {
|
||||||
// CreateAnimCursor sends an unchecked request.
|
// CreateAnimCursor sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateAnimCursor(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) CreateAnimCursorCookie {
|
func CreateAnimCursor(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) CreateAnimCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateAnimCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateAnimCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2115,6 +2158,8 @@ func CreateAnimCursor(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) C
|
||||||
// CreateAnimCursorChecked sends a checked request.
|
// CreateAnimCursorChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateAnimCursorCookie.Check()
|
// If an error occurs, it can be retrieved using CreateAnimCursorCookie.Check()
|
||||||
func CreateAnimCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) CreateAnimCursorCookie {
|
func CreateAnimCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) CreateAnimCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateAnimCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateAnimCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2136,7 +2181,9 @@ func createAnimCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcurso
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 31 // request opcode
|
buf[b] = 31 // request opcode
|
||||||
|
@ -2161,6 +2208,8 @@ type CreateConicalGradientCookie struct {
|
||||||
// CreateConicalGradient sends an unchecked request.
|
// CreateConicalGradient sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateConicalGradient(c *xgb.Conn, Picture Picture, Center Pointfix, Angle Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateConicalGradientCookie {
|
func CreateConicalGradient(c *xgb.Conn, Picture Picture, Center Pointfix, Angle Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateConicalGradientCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateConicalGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateConicalGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2172,6 +2221,8 @@ func CreateConicalGradient(c *xgb.Conn, Picture Picture, Center Pointfix, Angle
|
||||||
// CreateConicalGradientChecked sends a checked request.
|
// CreateConicalGradientChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateConicalGradientCookie.Check()
|
// If an error occurs, it can be retrieved using CreateConicalGradientCookie.Check()
|
||||||
func CreateConicalGradientChecked(c *xgb.Conn, Picture Picture, Center Pointfix, Angle Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateConicalGradientCookie {
|
func CreateConicalGradientChecked(c *xgb.Conn, Picture Picture, Center Pointfix, Angle Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateConicalGradientCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateConicalGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateConicalGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2193,7 +2244,9 @@ func createConicalGradientRequest(c *xgb.Conn, Picture Picture, Center Pointfix,
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 36 // request opcode
|
buf[b] = 36 // request opcode
|
||||||
|
@ -2239,6 +2292,8 @@ type CreateCursorCookie struct {
|
||||||
// CreateCursor sends an unchecked request.
|
// CreateCursor sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateCursor(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y uint16) CreateCursorCookie {
|
func CreateCursor(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y uint16) CreateCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2250,6 +2305,8 @@ func CreateCursor(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y ui
|
||||||
// CreateCursorChecked sends a checked request.
|
// CreateCursorChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateCursorCookie.Check()
|
// If an error occurs, it can be retrieved using CreateCursorCookie.Check()
|
||||||
func CreateCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y uint16) CreateCursorCookie {
|
func CreateCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y uint16) CreateCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateCursor' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2271,7 +2328,9 @@ func createCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint1
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 27 // request opcode
|
buf[b] = 27 // request opcode
|
||||||
|
@ -2303,6 +2362,8 @@ type CreateGlyphSetCookie struct {
|
||||||
// CreateGlyphSet sends an unchecked request.
|
// CreateGlyphSet sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateGlyphSet(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSetCookie {
|
func CreateGlyphSet(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2314,6 +2375,8 @@ func CreateGlyphSet(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSe
|
||||||
// CreateGlyphSetChecked sends a checked request.
|
// CreateGlyphSetChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateGlyphSetCookie.Check()
|
// If an error occurs, it can be retrieved using CreateGlyphSetCookie.Check()
|
||||||
func CreateGlyphSetChecked(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSetCookie {
|
func CreateGlyphSetChecked(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2335,7 +2398,9 @@ func createGlyphSetRequest(c *xgb.Conn, Gsid Glyphset, Format Pictformat) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 17 // request opcode
|
buf[b] = 17 // request opcode
|
||||||
|
@ -2361,6 +2426,8 @@ type CreateLinearGradientCookie struct {
|
||||||
// CreateLinearGradient sends an unchecked request.
|
// CreateLinearGradient sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateLinearGradient(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie {
|
func CreateLinearGradient(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateLinearGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateLinearGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2372,6 +2439,8 @@ func CreateLinearGradient(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix
|
||||||
// CreateLinearGradientChecked sends a checked request.
|
// CreateLinearGradientChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateLinearGradientCookie.Check()
|
// If an error occurs, it can be retrieved using CreateLinearGradientCookie.Check()
|
||||||
func CreateLinearGradientChecked(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie {
|
func CreateLinearGradientChecked(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateLinearGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateLinearGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2393,7 +2462,9 @@ func createLinearGradientRequest(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 P
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 34 // request opcode
|
buf[b] = 34 // request opcode
|
||||||
|
@ -2442,6 +2513,8 @@ type CreatePictureCookie struct {
|
||||||
// CreatePicture sends an unchecked request.
|
// CreatePicture sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreatePicture(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) CreatePictureCookie {
|
func CreatePicture(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) CreatePictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreatePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreatePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2453,6 +2526,8 @@ func CreatePicture(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pi
|
||||||
// CreatePictureChecked sends a checked request.
|
// CreatePictureChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreatePictureCookie.Check()
|
// If an error occurs, it can be retrieved using CreatePictureCookie.Check()
|
||||||
func CreatePictureChecked(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) CreatePictureCookie {
|
func CreatePictureChecked(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) CreatePictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreatePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreatePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2474,7 +2549,9 @@ func createPictureRequest(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Fo
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -2511,6 +2588,8 @@ type CreateRadialGradientCookie struct {
|
||||||
// CreateRadialGradient sends an unchecked request.
|
// CreateRadialGradient sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateRadialGradient(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Pointfix, InnerRadius Fixed, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie {
|
func CreateRadialGradient(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Pointfix, InnerRadius Fixed, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRadialGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRadialGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2522,6 +2601,8 @@ func CreateRadialGradient(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Po
|
||||||
// CreateRadialGradientChecked sends a checked request.
|
// CreateRadialGradientChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateRadialGradientCookie.Check()
|
// If an error occurs, it can be retrieved using CreateRadialGradientCookie.Check()
|
||||||
func CreateRadialGradientChecked(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Pointfix, InnerRadius Fixed, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie {
|
func CreateRadialGradientChecked(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Pointfix, InnerRadius Fixed, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRadialGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRadialGradient' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2543,7 +2624,9 @@ func createRadialGradientRequest(c *xgb.Conn, Picture Picture, Inner Pointfix, O
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 35 // request opcode
|
buf[b] = 35 // request opcode
|
||||||
|
@ -2598,6 +2681,8 @@ type CreateSolidFillCookie struct {
|
||||||
// CreateSolidFill sends an unchecked request.
|
// CreateSolidFill sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateSolidFill(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillCookie {
|
func CreateSolidFill(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSolidFill' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSolidFill' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2609,6 +2694,8 @@ func CreateSolidFill(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillC
|
||||||
// CreateSolidFillChecked sends a checked request.
|
// CreateSolidFillChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateSolidFillCookie.Check()
|
// If an error occurs, it can be retrieved using CreateSolidFillCookie.Check()
|
||||||
func CreateSolidFillChecked(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillCookie {
|
func CreateSolidFillChecked(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSolidFill' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSolidFill' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2630,7 +2717,9 @@ func createSolidFillRequest(c *xgb.Conn, Picture Picture, Color Color) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 33 // request opcode
|
buf[b] = 33 // request opcode
|
||||||
|
@ -2659,6 +2748,8 @@ type FillRectanglesCookie struct {
|
||||||
// FillRectangles sends an unchecked request.
|
// FillRectangles sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func FillRectangles(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xproto.Rectangle) FillRectanglesCookie {
|
func FillRectangles(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xproto.Rectangle) FillRectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FillRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FillRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2670,6 +2761,8 @@ func FillRectangles(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xpro
|
||||||
// FillRectanglesChecked sends a checked request.
|
// FillRectanglesChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using FillRectanglesCookie.Check()
|
// If an error occurs, it can be retrieved using FillRectanglesCookie.Check()
|
||||||
func FillRectanglesChecked(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xproto.Rectangle) FillRectanglesCookie {
|
func FillRectanglesChecked(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xproto.Rectangle) FillRectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FillRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FillRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2691,7 +2784,9 @@ func fillRectanglesRequest(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 26 // request opcode
|
buf[b] = 26 // request opcode
|
||||||
|
@ -2727,6 +2822,8 @@ type FreeGlyphSetCookie struct {
|
||||||
// FreeGlyphSet sends an unchecked request.
|
// FreeGlyphSet sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func FreeGlyphSet(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie {
|
func FreeGlyphSet(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FreeGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreeGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2738,6 +2835,8 @@ func FreeGlyphSet(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie {
|
||||||
// FreeGlyphSetChecked sends a checked request.
|
// FreeGlyphSetChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using FreeGlyphSetCookie.Check()
|
// If an error occurs, it can be retrieved using FreeGlyphSetCookie.Check()
|
||||||
func FreeGlyphSetChecked(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie {
|
func FreeGlyphSetChecked(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FreeGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreeGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2759,7 +2858,9 @@ func freeGlyphSetRequest(c *xgb.Conn, Glyphset Glyphset) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 19 // request opcode
|
buf[b] = 19 // request opcode
|
||||||
|
@ -2782,6 +2883,8 @@ type FreeGlyphsCookie struct {
|
||||||
// FreeGlyphs sends an unchecked request.
|
// FreeGlyphs sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func FreeGlyphs(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie {
|
func FreeGlyphs(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FreeGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreeGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2793,6 +2896,8 @@ func FreeGlyphs(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie
|
||||||
// FreeGlyphsChecked sends a checked request.
|
// FreeGlyphsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using FreeGlyphsCookie.Check()
|
// If an error occurs, it can be retrieved using FreeGlyphsCookie.Check()
|
||||||
func FreeGlyphsChecked(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie {
|
func FreeGlyphsChecked(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FreeGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreeGlyphs' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2814,7 +2919,9 @@ func freeGlyphsRequest(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 22 // request opcode
|
buf[b] = 22 // request opcode
|
||||||
|
@ -2842,6 +2949,8 @@ type FreePictureCookie struct {
|
||||||
// FreePicture sends an unchecked request.
|
// FreePicture sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func FreePicture(c *xgb.Conn, Picture Picture) FreePictureCookie {
|
func FreePicture(c *xgb.Conn, Picture Picture) FreePictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FreePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2853,6 +2962,8 @@ func FreePicture(c *xgb.Conn, Picture Picture) FreePictureCookie {
|
||||||
// FreePictureChecked sends a checked request.
|
// FreePictureChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using FreePictureCookie.Check()
|
// If an error occurs, it can be retrieved using FreePictureCookie.Check()
|
||||||
func FreePictureChecked(c *xgb.Conn, Picture Picture) FreePictureCookie {
|
func FreePictureChecked(c *xgb.Conn, Picture Picture) FreePictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'FreePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FreePicture' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2874,7 +2985,9 @@ func freePictureRequest(c *xgb.Conn, Picture Picture) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -2897,6 +3010,8 @@ type QueryFiltersCookie struct {
|
||||||
// QueryFilters sends a checked request.
|
// QueryFilters sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryFiltersCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryFiltersCookie.Reply()
|
||||||
func QueryFilters(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie {
|
func QueryFilters(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryFilters' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryFilters' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2908,6 +3023,8 @@ func QueryFilters(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie {
|
||||||
// QueryFiltersUnchecked sends an unchecked request.
|
// QueryFiltersUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryFiltersUnchecked(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie {
|
func QueryFiltersUnchecked(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryFilters' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryFilters' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2980,7 +3097,9 @@ func queryFiltersRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 29 // request opcode
|
buf[b] = 29 // request opcode
|
||||||
|
@ -3003,6 +3122,8 @@ type QueryPictFormatsCookie struct {
|
||||||
// QueryPictFormats sends a checked request.
|
// QueryPictFormats sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryPictFormatsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryPictFormatsCookie.Reply()
|
||||||
func QueryPictFormats(c *xgb.Conn) QueryPictFormatsCookie {
|
func QueryPictFormats(c *xgb.Conn) QueryPictFormatsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryPictFormats' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryPictFormats' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3014,6 +3135,8 @@ func QueryPictFormats(c *xgb.Conn) QueryPictFormatsCookie {
|
||||||
// QueryPictFormatsUnchecked sends an unchecked request.
|
// QueryPictFormatsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryPictFormatsUnchecked(c *xgb.Conn) QueryPictFormatsCookie {
|
func QueryPictFormatsUnchecked(c *xgb.Conn) QueryPictFormatsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryPictFormats' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryPictFormats' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3108,7 +3231,9 @@ func queryPictFormatsRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -3128,6 +3253,8 @@ type QueryPictIndexValuesCookie struct {
|
||||||
// QueryPictIndexValues sends a checked request.
|
// QueryPictIndexValues sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryPictIndexValuesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryPictIndexValuesCookie.Reply()
|
||||||
func QueryPictIndexValues(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCookie {
|
func QueryPictIndexValues(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryPictIndexValues' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryPictIndexValues' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3139,6 +3266,8 @@ func QueryPictIndexValues(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCo
|
||||||
// QueryPictIndexValuesUnchecked sends an unchecked request.
|
// QueryPictIndexValuesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryPictIndexValuesUnchecked(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCookie {
|
func QueryPictIndexValuesUnchecked(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryPictIndexValues' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryPictIndexValues' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3200,7 +3329,9 @@ func queryPictIndexValuesRequest(c *xgb.Conn, Format Pictformat) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -3223,6 +3354,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3234,6 +3367,8 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3295,7 +3430,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -3321,6 +3458,8 @@ type ReferenceGlyphSetCookie struct {
|
||||||
// ReferenceGlyphSet sends an unchecked request.
|
// ReferenceGlyphSet sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ReferenceGlyphSet(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceGlyphSetCookie {
|
func ReferenceGlyphSet(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceGlyphSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'ReferenceGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ReferenceGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3332,6 +3471,8 @@ func ReferenceGlyphSet(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceG
|
||||||
// ReferenceGlyphSetChecked sends a checked request.
|
// ReferenceGlyphSetChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ReferenceGlyphSetCookie.Check()
|
// If an error occurs, it can be retrieved using ReferenceGlyphSetCookie.Check()
|
||||||
func ReferenceGlyphSetChecked(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceGlyphSetCookie {
|
func ReferenceGlyphSetChecked(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceGlyphSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'ReferenceGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ReferenceGlyphSet' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3353,7 +3494,9 @@ func referenceGlyphSetRequest(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) []b
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 18 // request opcode
|
buf[b] = 18 // request opcode
|
||||||
|
@ -3379,6 +3522,8 @@ type SetPictureClipRectanglesCookie struct {
|
||||||
// SetPictureClipRectangles sends an unchecked request.
|
// SetPictureClipRectangles sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetPictureClipRectangles(c *xgb.Conn, Picture Picture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie {
|
func SetPictureClipRectangles(c *xgb.Conn, Picture Picture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureClipRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureClipRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3390,6 +3535,8 @@ func SetPictureClipRectangles(c *xgb.Conn, Picture Picture, ClipXOrigin int16, C
|
||||||
// SetPictureClipRectanglesChecked sends a checked request.
|
// SetPictureClipRectanglesChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetPictureClipRectanglesCookie.Check()
|
// If an error occurs, it can be retrieved using SetPictureClipRectanglesCookie.Check()
|
||||||
func SetPictureClipRectanglesChecked(c *xgb.Conn, Picture Picture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie {
|
func SetPictureClipRectanglesChecked(c *xgb.Conn, Picture Picture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureClipRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureClipRectangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3411,7 +3558,9 @@ func setPictureClipRectanglesRequest(c *xgb.Conn, Picture Picture, ClipXOrigin i
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -3442,6 +3591,8 @@ type SetPictureFilterCookie struct {
|
||||||
// SetPictureFilter sends an unchecked request.
|
// SetPictureFilter sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetPictureFilter(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) SetPictureFilterCookie {
|
func SetPictureFilter(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) SetPictureFilterCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureFilter' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureFilter' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3453,6 +3604,8 @@ func SetPictureFilter(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter str
|
||||||
// SetPictureFilterChecked sends a checked request.
|
// SetPictureFilterChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetPictureFilterCookie.Check()
|
// If an error occurs, it can be retrieved using SetPictureFilterCookie.Check()
|
||||||
func SetPictureFilterChecked(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) SetPictureFilterCookie {
|
func SetPictureFilterChecked(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) SetPictureFilterCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureFilter' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureFilter' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3474,7 +3627,9 @@ func setPictureFilterRequest(c *xgb.Conn, Picture Picture, FilterLen uint16, Fil
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 30 // request opcode
|
buf[b] = 30 // request opcode
|
||||||
|
@ -3514,6 +3669,8 @@ type SetPictureTransformCookie struct {
|
||||||
// SetPictureTransform sends an unchecked request.
|
// SetPictureTransform sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetPictureTransform(c *xgb.Conn, Picture Picture, Transform Transform) SetPictureTransformCookie {
|
func SetPictureTransform(c *xgb.Conn, Picture Picture, Transform Transform) SetPictureTransformCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureTransform' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureTransform' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3525,6 +3682,8 @@ func SetPictureTransform(c *xgb.Conn, Picture Picture, Transform Transform) SetP
|
||||||
// SetPictureTransformChecked sends a checked request.
|
// SetPictureTransformChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetPictureTransformCookie.Check()
|
// If an error occurs, it can be retrieved using SetPictureTransformCookie.Check()
|
||||||
func SetPictureTransformChecked(c *xgb.Conn, Picture Picture, Transform Transform) SetPictureTransformCookie {
|
func SetPictureTransformChecked(c *xgb.Conn, Picture Picture, Transform Transform) SetPictureTransformCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureTransform' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureTransform' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3546,7 +3705,9 @@ func setPictureTransformRequest(c *xgb.Conn, Picture Picture, Transform Transfor
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 28 // request opcode
|
buf[b] = 28 // request opcode
|
||||||
|
@ -3575,6 +3736,8 @@ type TrapezoidsCookie struct {
|
||||||
// Trapezoids sends an unchecked request.
|
// Trapezoids sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Trapezoids(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Traps []Trapezoid) TrapezoidsCookie {
|
func Trapezoids(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Traps []Trapezoid) TrapezoidsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'Trapezoids' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Trapezoids' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3586,6 +3749,8 @@ func Trapezoids(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictf
|
||||||
// TrapezoidsChecked sends a checked request.
|
// TrapezoidsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using TrapezoidsCookie.Check()
|
// If an error occurs, it can be retrieved using TrapezoidsCookie.Check()
|
||||||
func TrapezoidsChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Traps []Trapezoid) TrapezoidsCookie {
|
func TrapezoidsChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Traps []Trapezoid) TrapezoidsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'Trapezoids' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Trapezoids' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3607,7 +3772,9 @@ func trapezoidsRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskForma
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -3649,6 +3816,8 @@ type TriFanCookie struct {
|
||||||
// TriFan sends an unchecked request.
|
// TriFan sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func TriFan(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriFanCookie {
|
func TriFan(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriFanCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'TriFan' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'TriFan' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3660,6 +3829,8 @@ func TriFan(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictforma
|
||||||
// TriFanChecked sends a checked request.
|
// TriFanChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using TriFanCookie.Check()
|
// If an error occurs, it can be retrieved using TriFanCookie.Check()
|
||||||
func TriFanChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriFanCookie {
|
func TriFanChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriFanCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'TriFan' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'TriFan' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3681,7 +3852,9 @@ func triFanRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pi
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 13 // request opcode
|
buf[b] = 13 // request opcode
|
||||||
|
@ -3723,6 +3896,8 @@ type TriStripCookie struct {
|
||||||
// TriStrip sends an unchecked request.
|
// TriStrip sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func TriStrip(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriStripCookie {
|
func TriStrip(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriStripCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'TriStrip' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'TriStrip' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3734,6 +3909,8 @@ func TriStrip(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictfor
|
||||||
// TriStripChecked sends a checked request.
|
// TriStripChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using TriStripCookie.Check()
|
// If an error occurs, it can be retrieved using TriStripCookie.Check()
|
||||||
func TriStripChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriStripCookie {
|
func TriStripChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriStripCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'TriStrip' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'TriStrip' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3755,7 +3932,9 @@ func triStripRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 12 // request opcode
|
buf[b] = 12 // request opcode
|
||||||
|
@ -3797,6 +3976,8 @@ type TrianglesCookie struct {
|
||||||
// Triangles sends an unchecked request.
|
// Triangles sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Triangles(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Triangles []Triangle) TrianglesCookie {
|
func Triangles(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Triangles []Triangle) TrianglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'Triangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Triangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3808,6 +3989,8 @@ func Triangles(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictfo
|
||||||
// TrianglesChecked sends a checked request.
|
// TrianglesChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using TrianglesCookie.Check()
|
// If an error occurs, it can be retrieved using TrianglesCookie.Check()
|
||||||
func TrianglesChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Triangles []Triangle) TrianglesCookie {
|
func TrianglesChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Triangles []Triangle) TrianglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["RENDER"]; !ok {
|
if _, ok := c.Extensions["RENDER"]; !ok {
|
||||||
panic("Cannot issue request 'Triangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Triangles' using the uninitialized extension 'RENDER'. render.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -3829,7 +4012,9 @@ func trianglesRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["RENDER"]
|
buf[b] = c.Extensions["RENDER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named X-Resource could be found on on the server.")
|
return xgb.Errorf("No extension named X-Resource could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["X-Resource"] = reply.MajorOpcode
|
c.Extensions["X-Resource"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["X-Resource"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["X-Resource"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["X-Resource"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["X-Resource"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,6 +510,8 @@ type QueryClientIdsCookie struct {
|
||||||
// QueryClientIds sends a checked request.
|
// QueryClientIds sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryClientIdsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryClientIdsCookie.Reply()
|
||||||
func QueryClientIds(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) QueryClientIdsCookie {
|
func QueryClientIds(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) QueryClientIdsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClientIds' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClientIds' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -522,6 +523,8 @@ func QueryClientIds(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) QueryCli
|
||||||
// QueryClientIdsUnchecked sends an unchecked request.
|
// QueryClientIdsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryClientIdsUnchecked(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) QueryClientIdsCookie {
|
func QueryClientIdsUnchecked(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) QueryClientIdsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClientIds' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClientIds' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -583,7 +586,9 @@ func queryClientIdsRequest(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) [
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["X-Resource"]
|
buf[b] = c.Extensions["X-Resource"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -608,6 +613,8 @@ type QueryClientPixmapBytesCookie struct {
|
||||||
// QueryClientPixmapBytes sends a checked request.
|
// QueryClientPixmapBytes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryClientPixmapBytesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryClientPixmapBytesCookie.Reply()
|
||||||
func QueryClientPixmapBytes(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCookie {
|
func QueryClientPixmapBytes(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClientPixmapBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClientPixmapBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -619,6 +626,8 @@ func QueryClientPixmapBytes(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCooki
|
||||||
// QueryClientPixmapBytesUnchecked sends an unchecked request.
|
// QueryClientPixmapBytesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryClientPixmapBytesUnchecked(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCookie {
|
func QueryClientPixmapBytesUnchecked(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClientPixmapBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClientPixmapBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -677,7 +686,9 @@ func queryClientPixmapBytesRequest(c *xgb.Conn, Xid uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["X-Resource"]
|
buf[b] = c.Extensions["X-Resource"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -700,6 +711,8 @@ type QueryClientResourcesCookie struct {
|
||||||
// QueryClientResources sends a checked request.
|
// QueryClientResources sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryClientResourcesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryClientResourcesCookie.Reply()
|
||||||
func QueryClientResources(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie {
|
func QueryClientResources(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClientResources' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClientResources' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -711,6 +724,8 @@ func QueryClientResources(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie {
|
||||||
// QueryClientResourcesUnchecked sends an unchecked request.
|
// QueryClientResourcesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryClientResourcesUnchecked(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie {
|
func QueryClientResourcesUnchecked(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClientResources' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClientResources' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -772,7 +787,9 @@ func queryClientResourcesRequest(c *xgb.Conn, Xid uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["X-Resource"]
|
buf[b] = c.Extensions["X-Resource"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -795,6 +812,8 @@ type QueryClientsCookie struct {
|
||||||
// QueryClients sends a checked request.
|
// QueryClients sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryClientsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryClientsCookie.Reply()
|
||||||
func QueryClients(c *xgb.Conn) QueryClientsCookie {
|
func QueryClients(c *xgb.Conn) QueryClientsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClients' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClients' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -806,6 +825,8 @@ func QueryClients(c *xgb.Conn) QueryClientsCookie {
|
||||||
// QueryClientsUnchecked sends an unchecked request.
|
// QueryClientsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryClientsUnchecked(c *xgb.Conn) QueryClientsCookie {
|
func QueryClientsUnchecked(c *xgb.Conn) QueryClientsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryClients' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryClients' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -867,7 +888,9 @@ func queryClientsRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["X-Resource"]
|
buf[b] = c.Extensions["X-Resource"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -887,6 +910,8 @@ type QueryResourceBytesCookie struct {
|
||||||
// QueryResourceBytes sends a checked request.
|
// QueryResourceBytes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryResourceBytesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryResourceBytesCookie.Reply()
|
||||||
func QueryResourceBytes(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie {
|
func QueryResourceBytes(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryResourceBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryResourceBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -898,6 +923,8 @@ func QueryResourceBytes(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []Res
|
||||||
// QueryResourceBytesUnchecked sends an unchecked request.
|
// QueryResourceBytesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryResourceBytesUnchecked(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie {
|
func QueryResourceBytesUnchecked(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryResourceBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryResourceBytes' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -959,7 +986,9 @@ func queryResourceBytesRequest(c *xgb.Conn, Client uint32, NumSpecs uint32, Spec
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["X-Resource"]
|
buf[b] = c.Extensions["X-Resource"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -987,6 +1016,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -998,6 +1029,8 @@ func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionC
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["X-Resource"]; !ok {
|
if _, ok := c.Extensions["X-Resource"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'X-Resource'. res.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1056,7 +1089,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajor byte, ClientMinor byte) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["X-Resource"]
|
buf[b] = c.Extensions["X-Resource"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named MIT-SCREEN-SAVER could be found on on the server.")
|
return xgb.Errorf("No extension named MIT-SCREEN-SAVER could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["MIT-SCREEN-SAVER"] = reply.MajorOpcode
|
c.Extensions["MIT-SCREEN-SAVER"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["MIT-SCREEN-SAVER"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["MIT-SCREEN-SAVER"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["MIT-SCREEN-SAVER"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["MIT-SCREEN-SAVER"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,6 +197,8 @@ type QueryInfoCookie struct {
|
||||||
// QueryInfo sends a checked request.
|
// QueryInfo sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryInfoCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryInfoCookie.Reply()
|
||||||
func QueryInfo(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie {
|
func QueryInfo(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryInfo' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryInfo' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -209,6 +210,8 @@ func QueryInfo(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie {
|
||||||
// QueryInfoUnchecked sends an unchecked request.
|
// QueryInfoUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryInfoUnchecked(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie {
|
func QueryInfoUnchecked(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryInfo' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryInfo' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -283,7 +286,9 @@ func queryInfoRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -306,6 +311,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -317,6 +324,8 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte)
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -378,7 +387,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersio
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -406,6 +417,8 @@ type SelectInputCookie struct {
|
||||||
// SelectInput sends an unchecked request.
|
// SelectInput sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SelectInput(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie {
|
func SelectInput(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -417,6 +430,8 @@ func SelectInput(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) Select
|
||||||
// SelectInputChecked sends a checked request.
|
// SelectInputChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SelectInputCookie.Check()
|
// If an error occurs, it can be retrieved using SelectInputCookie.Check()
|
||||||
func SelectInputChecked(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie {
|
func SelectInputChecked(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -438,7 +453,9 @@ func selectInputRequest(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -464,6 +481,8 @@ type SetAttributesCookie struct {
|
||||||
// SetAttributes sends an unchecked request.
|
// SetAttributes sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetAttributes(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie {
|
func SetAttributes(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'SetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -475,6 +494,8 @@ func SetAttributes(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Widt
|
||||||
// SetAttributesChecked sends a checked request.
|
// SetAttributesChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetAttributesCookie.Check()
|
// If an error occurs, it can be retrieved using SetAttributesCookie.Check()
|
||||||
func SetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie {
|
func SetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'SetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -496,7 +517,9 @@ func setAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int1
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -551,6 +574,8 @@ type SuspendCookie struct {
|
||||||
// Suspend sends an unchecked request.
|
// Suspend sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Suspend(c *xgb.Conn, Suspend bool) SuspendCookie {
|
func Suspend(c *xgb.Conn, Suspend bool) SuspendCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'Suspend' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Suspend' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -562,6 +587,8 @@ func Suspend(c *xgb.Conn, Suspend bool) SuspendCookie {
|
||||||
// SuspendChecked sends a checked request.
|
// SuspendChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SuspendCookie.Check()
|
// If an error occurs, it can be retrieved using SuspendCookie.Check()
|
||||||
func SuspendChecked(c *xgb.Conn, Suspend bool) SuspendCookie {
|
func SuspendChecked(c *xgb.Conn, Suspend bool) SuspendCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'Suspend' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Suspend' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -583,7 +610,9 @@ func suspendRequest(c *xgb.Conn, Suspend bool) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -612,6 +641,8 @@ type UnsetAttributesCookie struct {
|
||||||
// UnsetAttributes sends an unchecked request.
|
// UnsetAttributes sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func UnsetAttributes(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie {
|
func UnsetAttributes(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'UnsetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnsetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -623,6 +654,8 @@ func UnsetAttributes(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCooki
|
||||||
// UnsetAttributesChecked sends a checked request.
|
// UnsetAttributesChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using UnsetAttributesCookie.Check()
|
// If an error occurs, it can be retrieved using UnsetAttributesCookie.Check()
|
||||||
func UnsetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie {
|
func UnsetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok {
|
||||||
panic("Cannot issue request 'UnsetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnsetAttributes' using the uninitialized extension 'MIT-SCREEN-SAVER'. screensaver.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -644,7 +677,9 @@ func unsetAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
buf[b] = c.Extensions["MIT-SCREEN-SAVER"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named SHAPE could be found on on the server.")
|
return xgb.Errorf("No extension named SHAPE could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["SHAPE"] = reply.MajorOpcode
|
c.Extensions["SHAPE"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["SHAPE"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["SHAPE"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["SHAPE"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["SHAPE"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,6 +213,8 @@ type CombineCookie struct {
|
||||||
// Combine sends an unchecked request.
|
// Combine sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Combine(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie {
|
func Combine(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Combine' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Combine' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -225,6 +226,8 @@ func Combine(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, D
|
||||||
// CombineChecked sends a checked request.
|
// CombineChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CombineCookie.Check()
|
// If an error occurs, it can be retrieved using CombineCookie.Check()
|
||||||
func CombineChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie {
|
func CombineChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Combine' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Combine' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -246,7 +249,9 @@ func combineRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -289,6 +294,8 @@ type GetRectanglesCookie struct {
|
||||||
// GetRectangles sends a checked request.
|
// GetRectangles sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetRectanglesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetRectanglesCookie.Reply()
|
||||||
func GetRectangles(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectanglesCookie {
|
func GetRectangles(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'GetRectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetRectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -300,6 +307,8 @@ func GetRectangles(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectan
|
||||||
// GetRectanglesUnchecked sends an unchecked request.
|
// GetRectanglesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetRectanglesUnchecked(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectanglesCookie {
|
func GetRectanglesUnchecked(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'GetRectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetRectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -362,7 +371,9 @@ func getRectanglesRequest(c *xgb.Conn, Window xproto.Window, SourceKind Kind) []
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -390,6 +401,8 @@ type InputSelectedCookie struct {
|
||||||
// InputSelected sends a checked request.
|
// InputSelected sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling InputSelectedCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling InputSelectedCookie.Reply()
|
||||||
func InputSelected(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie {
|
func InputSelected(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'InputSelected' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'InputSelected' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -401,6 +414,8 @@ func InputSelected(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCo
|
||||||
// InputSelectedUnchecked sends an unchecked request.
|
// InputSelectedUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func InputSelectedUnchecked(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie {
|
func InputSelectedUnchecked(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'InputSelected' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'InputSelected' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -456,7 +471,9 @@ func inputSelectedRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -479,6 +496,8 @@ type MaskCookie struct {
|
||||||
// Mask sends an unchecked request.
|
// Mask sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Mask(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie {
|
func Mask(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Mask' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Mask' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -490,6 +509,8 @@ func Mask(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xpr
|
||||||
// MaskChecked sends a checked request.
|
// MaskChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using MaskCookie.Check()
|
// If an error occurs, it can be retrieved using MaskCookie.Check()
|
||||||
func MaskChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie {
|
func MaskChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Mask' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Mask' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -511,7 +532,9 @@ func maskRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWin
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -551,6 +574,8 @@ type OffsetCookie struct {
|
||||||
// Offset sends an unchecked request.
|
// Offset sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Offset(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie {
|
func Offset(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Offset' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Offset' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -562,6 +587,8 @@ func Offset(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window,
|
||||||
// OffsetChecked sends a checked request.
|
// OffsetChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using OffsetCookie.Check()
|
// If an error occurs, it can be retrieved using OffsetCookie.Check()
|
||||||
func OffsetChecked(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie {
|
func OffsetChecked(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Offset' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Offset' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -583,7 +610,9 @@ func offsetRequest(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.W
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -617,6 +646,8 @@ type QueryExtentsCookie struct {
|
||||||
// QueryExtents sends a checked request.
|
// QueryExtents sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryExtentsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryExtentsCookie.Reply()
|
||||||
func QueryExtents(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie {
|
func QueryExtents(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryExtents' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryExtents' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -628,6 +659,8 @@ func QueryExtents(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCook
|
||||||
// QueryExtentsUnchecked sends an unchecked request.
|
// QueryExtentsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryExtentsUnchecked(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie {
|
func QueryExtentsUnchecked(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryExtents' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryExtents' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -729,7 +762,9 @@ func queryExtentsRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -752,6 +787,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -763,6 +800,8 @@ func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -821,7 +860,9 @@ func queryVersionRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -841,6 +882,8 @@ type RectanglesCookie struct {
|
||||||
// Rectangles sends an unchecked request.
|
// Rectangles sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Rectangles(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie {
|
func Rectangles(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Rectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Rectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -852,6 +895,8 @@ func Rectangles(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte,
|
||||||
// RectanglesChecked sends a checked request.
|
// RectanglesChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using RectanglesCookie.Check()
|
// If an error occurs, it can be retrieved using RectanglesCookie.Check()
|
||||||
func RectanglesChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie {
|
func RectanglesChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'Rectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Rectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -873,7 +918,9 @@ func rectanglesRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -915,6 +962,8 @@ type SelectInputCookie struct {
|
||||||
// SelectInput sends an unchecked request.
|
// SelectInput sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SelectInput(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie {
|
func SelectInput(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -926,6 +975,8 @@ func SelectInput(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) Sele
|
||||||
// SelectInputChecked sends a checked request.
|
// SelectInputChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SelectInputCookie.Check()
|
// If an error occurs, it can be retrieved using SelectInputCookie.Check()
|
||||||
func SelectInputChecked(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie {
|
func SelectInputChecked(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SHAPE"]; !ok {
|
if _, ok := c.Extensions["SHAPE"]; !ok {
|
||||||
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -947,7 +998,9 @@ func selectInputRequest(c *xgb.Conn, DestinationWindow xproto.Window, Enable boo
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SHAPE"]
|
buf[b] = c.Extensions["SHAPE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named MIT-SHM could be found on on the server.")
|
return xgb.Errorf("No extension named MIT-SHM could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["MIT-SHM"] = reply.MajorOpcode
|
c.Extensions["MIT-SHM"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["MIT-SHM"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["MIT-SHM"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["MIT-SHM"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["MIT-SHM"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +216,8 @@ type AttachCookie struct {
|
||||||
// Attach sends an unchecked request.
|
// Attach sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Attach(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie {
|
func Attach(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'Attach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Attach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -228,6 +229,8 @@ func Attach(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie {
|
||||||
// AttachChecked sends a checked request.
|
// AttachChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using AttachCookie.Check()
|
// If an error occurs, it can be retrieved using AttachCookie.Check()
|
||||||
func AttachChecked(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie {
|
func AttachChecked(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'Attach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Attach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -249,7 +252,9 @@ func attachRequest(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -284,6 +289,8 @@ type AttachFdCookie struct {
|
||||||
// AttachFd sends an unchecked request.
|
// AttachFd sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func AttachFd(c *xgb.Conn, Shmseg Seg, ReadOnly bool) AttachFdCookie {
|
func AttachFd(c *xgb.Conn, Shmseg Seg, ReadOnly bool) AttachFdCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'AttachFd' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AttachFd' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -295,6 +302,8 @@ func AttachFd(c *xgb.Conn, Shmseg Seg, ReadOnly bool) AttachFdCookie {
|
||||||
// AttachFdChecked sends a checked request.
|
// AttachFdChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using AttachFdCookie.Check()
|
// If an error occurs, it can be retrieved using AttachFdCookie.Check()
|
||||||
func AttachFdChecked(c *xgb.Conn, Shmseg Seg, ReadOnly bool) AttachFdCookie {
|
func AttachFdChecked(c *xgb.Conn, Shmseg Seg, ReadOnly bool) AttachFdCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'AttachFd' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AttachFd' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -316,7 +325,9 @@ func attachFdRequest(c *xgb.Conn, Shmseg Seg, ReadOnly bool) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -348,6 +359,8 @@ type CreatePixmapCookie struct {
|
||||||
// CreatePixmap sends an unchecked request.
|
// CreatePixmap sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreatePixmap(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie {
|
func CreatePixmap(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'CreatePixmap' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreatePixmap' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -359,6 +372,8 @@ func CreatePixmap(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Widt
|
||||||
// CreatePixmapChecked sends a checked request.
|
// CreatePixmapChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreatePixmapCookie.Check()
|
// If an error occurs, it can be retrieved using CreatePixmapCookie.Check()
|
||||||
func CreatePixmapChecked(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie {
|
func CreatePixmapChecked(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'CreatePixmap' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreatePixmap' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -380,7 +395,9 @@ func createPixmapRequest(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawabl
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -423,6 +440,8 @@ type CreateSegmentCookie struct {
|
||||||
// CreateSegment sends a checked request.
|
// CreateSegment sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CreateSegmentCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CreateSegmentCookie.Reply()
|
||||||
func CreateSegment(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) CreateSegmentCookie {
|
func CreateSegment(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) CreateSegmentCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSegment' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSegment' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -434,6 +453,8 @@ func CreateSegment(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) CreateSe
|
||||||
// CreateSegmentUnchecked sends an unchecked request.
|
// CreateSegmentUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateSegmentUnchecked(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) CreateSegmentCookie {
|
func CreateSegmentUnchecked(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) CreateSegmentCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSegment' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSegment' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -488,7 +509,9 @@ func createSegmentRequest(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) [
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -523,6 +546,8 @@ type DetachCookie struct {
|
||||||
// Detach sends an unchecked request.
|
// Detach sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func Detach(c *xgb.Conn, Shmseg Seg) DetachCookie {
|
func Detach(c *xgb.Conn, Shmseg Seg) DetachCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'Detach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Detach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -534,6 +559,8 @@ func Detach(c *xgb.Conn, Shmseg Seg) DetachCookie {
|
||||||
// DetachChecked sends a checked request.
|
// DetachChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DetachCookie.Check()
|
// If an error occurs, it can be retrieved using DetachCookie.Check()
|
||||||
func DetachChecked(c *xgb.Conn, Shmseg Seg) DetachCookie {
|
func DetachChecked(c *xgb.Conn, Shmseg Seg) DetachCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'Detach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Detach' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -555,7 +582,9 @@ func detachRequest(c *xgb.Conn, Shmseg Seg) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -578,6 +607,8 @@ type GetImageCookie struct {
|
||||||
// GetImage sends a checked request.
|
// GetImage sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetImageCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetImageCookie.Reply()
|
||||||
func GetImage(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie {
|
func GetImage(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'GetImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -589,6 +620,8 @@ func GetImage(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uin
|
||||||
// GetImageUnchecked sends an unchecked request.
|
// GetImageUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetImageUnchecked(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie {
|
func GetImageUnchecked(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'GetImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -648,7 +681,9 @@ func getImageRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Wi
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -697,6 +732,8 @@ type PutImageCookie struct {
|
||||||
// PutImage sends an unchecked request.
|
// PutImage sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PutImage(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie {
|
func PutImage(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'PutImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -708,6 +745,8 @@ func PutImage(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWi
|
||||||
// PutImageChecked sends a checked request.
|
// PutImageChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PutImageCookie.Check()
|
// If an error occurs, it can be retrieved using PutImageCookie.Check()
|
||||||
func PutImageChecked(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie {
|
func PutImageChecked(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'PutImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutImage' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -729,7 +768,9 @@ func putImageRequest(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext,
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -796,6 +837,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -807,6 +850,8 @@ func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
if _, ok := c.Extensions["MIT-SHM"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'MIT-SHM'. shm.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -885,7 +930,9 @@ func queryVersionRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["MIT-SHM"]
|
buf[b] = c.Extensions["MIT-SHM"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XC-MISC could be found on on the server.")
|
return xgb.Errorf("No extension named XC-MISC could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XC-MISC"] = reply.MajorOpcode
|
c.Extensions["XC-MISC"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XC-MISC"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XC-MISC"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XC-MISC"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XC-MISC"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +68,8 @@ type GetVersionCookie struct {
|
||||||
// GetVersion sends a checked request.
|
// GetVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
|
||||||
func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
||||||
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -80,6 +81,8 @@ func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint1
|
||||||
// GetVersionUnchecked sends an unchecked request.
|
// GetVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
||||||
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -138,7 +141,9 @@ func getVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersio
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XC-MISC"]
|
buf[b] = c.Extensions["XC-MISC"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -164,6 +169,8 @@ type GetXIDListCookie struct {
|
||||||
// GetXIDList sends a checked request.
|
// GetXIDList sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetXIDListCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetXIDListCookie.Reply()
|
||||||
func GetXIDList(c *xgb.Conn, Count uint32) GetXIDListCookie {
|
func GetXIDList(c *xgb.Conn, Count uint32) GetXIDListCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
||||||
panic("Cannot issue request 'GetXIDList' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetXIDList' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -175,6 +182,8 @@ func GetXIDList(c *xgb.Conn, Count uint32) GetXIDListCookie {
|
||||||
// GetXIDListUnchecked sends an unchecked request.
|
// GetXIDListUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetXIDListUnchecked(c *xgb.Conn, Count uint32) GetXIDListCookie {
|
func GetXIDListUnchecked(c *xgb.Conn, Count uint32) GetXIDListCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
||||||
panic("Cannot issue request 'GetXIDList' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetXIDList' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -239,7 +248,9 @@ func getXIDListRequest(c *xgb.Conn, Count uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XC-MISC"]
|
buf[b] = c.Extensions["XC-MISC"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -262,6 +273,8 @@ type GetXIDRangeCookie struct {
|
||||||
// GetXIDRange sends a checked request.
|
// GetXIDRange sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetXIDRangeCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetXIDRangeCookie.Reply()
|
||||||
func GetXIDRange(c *xgb.Conn) GetXIDRangeCookie {
|
func GetXIDRange(c *xgb.Conn) GetXIDRangeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
||||||
panic("Cannot issue request 'GetXIDRange' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetXIDRange' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -273,6 +286,8 @@ func GetXIDRange(c *xgb.Conn) GetXIDRangeCookie {
|
||||||
// GetXIDRangeUnchecked sends an unchecked request.
|
// GetXIDRangeUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetXIDRangeUnchecked(c *xgb.Conn) GetXIDRangeCookie {
|
func GetXIDRangeUnchecked(c *xgb.Conn) GetXIDRangeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
if _, ok := c.Extensions["XC-MISC"]; !ok {
|
||||||
panic("Cannot issue request 'GetXIDRange' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetXIDRange' using the uninitialized extension 'XC-MISC'. xcmisc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -331,7 +346,9 @@ func getXIDRangeRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XC-MISC"]
|
buf[b] = c.Extensions["XC-MISC"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XEVIE could be found on on the server.")
|
return xgb.Errorf("No extension named XEVIE could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XEVIE"] = reply.MajorOpcode
|
c.Extensions["XEVIE"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XEVIE"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XEVIE"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XEVIE"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XEVIE"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +118,8 @@ type EndCookie struct {
|
||||||
// End sends a checked request.
|
// End sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling EndCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling EndCookie.Reply()
|
||||||
func End(c *xgb.Conn, Cmap uint32) EndCookie {
|
func End(c *xgb.Conn, Cmap uint32) EndCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -130,6 +131,8 @@ func End(c *xgb.Conn, Cmap uint32) EndCookie {
|
||||||
// EndUnchecked sends an unchecked request.
|
// EndUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func EndUnchecked(c *xgb.Conn, Cmap uint32) EndCookie {
|
func EndUnchecked(c *xgb.Conn, Cmap uint32) EndCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -183,7 +186,9 @@ func endRequest(c *xgb.Conn, Cmap uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XEVIE"]
|
buf[b] = c.Extensions["XEVIE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -206,6 +211,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// 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 {
|
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -217,6 +224,8 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uin
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// 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 {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -278,7 +287,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVers
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XEVIE"]
|
buf[b] = c.Extensions["XEVIE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -304,6 +315,8 @@ type SelectInputCookie struct {
|
||||||
// SelectInput sends a checked request.
|
// SelectInput sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply()
|
||||||
func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
|
func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -315,6 +328,8 @@ func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
|
||||||
// SelectInputUnchecked sends an unchecked request.
|
// SelectInputUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SelectInputUnchecked(c *xgb.Conn, EventMask uint32) SelectInputCookie {
|
func SelectInputUnchecked(c *xgb.Conn, EventMask uint32) SelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -368,7 +383,9 @@ func selectInputRequest(c *xgb.Conn, EventMask uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XEVIE"]
|
buf[b] = c.Extensions["XEVIE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -391,6 +408,8 @@ type SendCookie struct {
|
||||||
// Send sends a checked request.
|
// Send sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling SendCookie.Reply()
|
// 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 {
|
func Send(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'Send' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Send' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -402,6 +421,8 @@ func Send(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
|
||||||
// SendUnchecked sends an unchecked request.
|
// SendUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// 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 {
|
func SendUnchecked(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'Send' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Send' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -455,7 +476,9 @@ func sendRequest(c *xgb.Conn, Event Event, DataType uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XEVIE"]
|
buf[b] = c.Extensions["XEVIE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -486,6 +509,8 @@ type StartCookie struct {
|
||||||
// Start sends a checked request.
|
// Start sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling StartCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling StartCookie.Reply()
|
||||||
func Start(c *xgb.Conn, Screen uint32) StartCookie {
|
func Start(c *xgb.Conn, Screen uint32) StartCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -497,6 +522,8 @@ func Start(c *xgb.Conn, Screen uint32) StartCookie {
|
||||||
// StartUnchecked sends an unchecked request.
|
// StartUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func StartUnchecked(c *xgb.Conn, Screen uint32) StartCookie {
|
func StartUnchecked(c *xgb.Conn, Screen uint32) StartCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XEVIE"]; !ok {
|
if _, ok := c.Extensions["XEVIE"]; !ok {
|
||||||
panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -550,7 +577,9 @@ func startRequest(c *xgb.Conn, Screen uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XEVIE"]
|
buf[b] = c.Extensions["XEVIE"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XFree86-DRI could be found on on the server.")
|
return xgb.Errorf("No extension named XFree86-DRI could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XFree86-DRI"] = reply.MajorOpcode
|
c.Extensions["XFree86-DRI"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XFree86-DRI"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XFree86-DRI"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XFree86-DRI"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XFree86-DRI"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +136,8 @@ type AuthConnectionCookie struct {
|
||||||
// AuthConnection sends a checked request.
|
// AuthConnection sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling AuthConnectionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling AuthConnectionCookie.Reply()
|
||||||
func AuthConnection(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCookie {
|
func AuthConnection(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'AuthConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AuthConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -148,6 +149,8 @@ func AuthConnection(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCook
|
||||||
// AuthConnectionUnchecked sends an unchecked request.
|
// AuthConnectionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func AuthConnectionUnchecked(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCookie {
|
func AuthConnectionUnchecked(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'AuthConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AuthConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -202,7 +205,9 @@ func authConnectionRequest(c *xgb.Conn, Screen uint32, Magic uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
@ -228,6 +233,8 @@ type CloseConnectionCookie struct {
|
||||||
// CloseConnection sends an unchecked request.
|
// CloseConnection sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CloseConnection(c *xgb.Conn, Screen uint32) CloseConnectionCookie {
|
func CloseConnection(c *xgb.Conn, Screen uint32) CloseConnectionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'CloseConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CloseConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -239,6 +246,8 @@ func CloseConnection(c *xgb.Conn, Screen uint32) CloseConnectionCookie {
|
||||||
// CloseConnectionChecked sends a checked request.
|
// CloseConnectionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CloseConnectionCookie.Check()
|
// If an error occurs, it can be retrieved using CloseConnectionCookie.Check()
|
||||||
func CloseConnectionChecked(c *xgb.Conn, Screen uint32) CloseConnectionCookie {
|
func CloseConnectionChecked(c *xgb.Conn, Screen uint32) CloseConnectionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'CloseConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CloseConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -260,7 +269,9 @@ func closeConnectionRequest(c *xgb.Conn, Screen uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -283,6 +294,8 @@ type CreateContextCookie struct {
|
||||||
// CreateContext sends a checked request.
|
// CreateContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply()
|
||||||
func CreateContext(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) CreateContextCookie {
|
func CreateContext(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -294,6 +307,8 @@ func CreateContext(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) Cr
|
||||||
// CreateContextUnchecked sends an unchecked request.
|
// CreateContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateContextUnchecked(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) CreateContextCookie {
|
func CreateContextUnchecked(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -348,7 +363,9 @@ func createContextRequest(c *xgb.Conn, Screen uint32, Visual uint32, Context uin
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -377,6 +394,8 @@ type CreateDrawableCookie struct {
|
||||||
// CreateDrawable sends a checked request.
|
// CreateDrawable sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CreateDrawableCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CreateDrawableCookie.Reply()
|
||||||
func CreateDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableCookie {
|
func CreateDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -388,6 +407,8 @@ func CreateDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableC
|
||||||
// CreateDrawableUnchecked sends an unchecked request.
|
// CreateDrawableUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateDrawableUnchecked(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableCookie {
|
func CreateDrawableUnchecked(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -442,7 +463,9 @@ func createDrawableRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -468,6 +491,8 @@ type DestroyContextCookie struct {
|
||||||
// DestroyContext sends an unchecked request.
|
// DestroyContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DestroyContext(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCookie {
|
func DestroyContext(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -479,6 +504,8 @@ func DestroyContext(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCo
|
||||||
// DestroyContextChecked sends a checked request.
|
// DestroyContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroyContextCookie.Check()
|
// If an error occurs, it can be retrieved using DestroyContextCookie.Check()
|
||||||
func DestroyContextChecked(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCookie {
|
func DestroyContextChecked(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -500,7 +527,9 @@ func destroyContextRequest(c *xgb.Conn, Screen uint32, Context uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -526,6 +555,8 @@ type DestroyDrawableCookie struct {
|
||||||
// DestroyDrawable sends an unchecked request.
|
// DestroyDrawable sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DestroyDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawableCookie {
|
func DestroyDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -537,6 +568,8 @@ func DestroyDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawabl
|
||||||
// DestroyDrawableChecked sends a checked request.
|
// DestroyDrawableChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check()
|
// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check()
|
||||||
func DestroyDrawableChecked(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawableCookie {
|
func DestroyDrawableChecked(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -558,7 +591,9 @@ func destroyDrawableRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -584,6 +619,8 @@ type GetClientDriverNameCookie struct {
|
||||||
// GetClientDriverName sends a checked request.
|
// GetClientDriverName sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetClientDriverNameCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetClientDriverNameCookie.Reply()
|
||||||
func GetClientDriverName(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie {
|
func GetClientDriverName(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'GetClientDriverName' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetClientDriverName' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -595,6 +632,8 @@ func GetClientDriverName(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie {
|
||||||
// GetClientDriverNameUnchecked sends an unchecked request.
|
// GetClientDriverNameUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetClientDriverNameUnchecked(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie {
|
func GetClientDriverNameUnchecked(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'GetClientDriverName' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetClientDriverName' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -672,7 +711,9 @@ func getClientDriverNameRequest(c *xgb.Conn, Screen uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -695,6 +736,8 @@ type GetDeviceInfoCookie struct {
|
||||||
// GetDeviceInfo sends a checked request.
|
// GetDeviceInfo sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetDeviceInfoCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetDeviceInfoCookie.Reply()
|
||||||
func GetDeviceInfo(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie {
|
func GetDeviceInfo(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'GetDeviceInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDeviceInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -706,6 +749,8 @@ func GetDeviceInfo(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie {
|
||||||
// GetDeviceInfoUnchecked sends an unchecked request.
|
// GetDeviceInfoUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetDeviceInfoUnchecked(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie {
|
func GetDeviceInfoUnchecked(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'GetDeviceInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDeviceInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -787,7 +832,9 @@ func getDeviceInfoRequest(c *xgb.Conn, Screen uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -810,6 +857,8 @@ type GetDrawableInfoCookie struct {
|
||||||
// GetDrawableInfo sends a checked request.
|
// GetDrawableInfo sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetDrawableInfoCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetDrawableInfoCookie.Reply()
|
||||||
func GetDrawableInfo(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInfoCookie {
|
func GetDrawableInfo(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'GetDrawableInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDrawableInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -821,6 +870,8 @@ func GetDrawableInfo(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInf
|
||||||
// GetDrawableInfoUnchecked sends an unchecked request.
|
// GetDrawableInfoUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetDrawableInfoUnchecked(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInfoCookie {
|
func GetDrawableInfoUnchecked(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInfoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'GetDrawableInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDrawableInfo' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -922,7 +973,9 @@ func getDrawableInfoRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 9 // request opcode
|
buf[b] = 9 // request opcode
|
||||||
|
@ -948,6 +1001,8 @@ type OpenConnectionCookie struct {
|
||||||
// OpenConnection sends a checked request.
|
// OpenConnection sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling OpenConnectionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling OpenConnectionCookie.Reply()
|
||||||
func OpenConnection(c *xgb.Conn, Screen uint32) OpenConnectionCookie {
|
func OpenConnection(c *xgb.Conn, Screen uint32) OpenConnectionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'OpenConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'OpenConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -959,6 +1014,8 @@ func OpenConnection(c *xgb.Conn, Screen uint32) OpenConnectionCookie {
|
||||||
// OpenConnectionUnchecked sends an unchecked request.
|
// OpenConnectionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func OpenConnectionUnchecked(c *xgb.Conn, Screen uint32) OpenConnectionCookie {
|
func OpenConnectionUnchecked(c *xgb.Conn, Screen uint32) OpenConnectionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'OpenConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'OpenConnection' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1032,7 +1089,9 @@ func openConnectionRequest(c *xgb.Conn, Screen uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -1055,6 +1114,8 @@ type QueryDirectRenderingCapableCookie struct {
|
||||||
// QueryDirectRenderingCapable sends a checked request.
|
// QueryDirectRenderingCapable sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryDirectRenderingCapableCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryDirectRenderingCapableCookie.Reply()
|
||||||
func QueryDirectRenderingCapable(c *xgb.Conn, Screen uint32) QueryDirectRenderingCapableCookie {
|
func QueryDirectRenderingCapable(c *xgb.Conn, Screen uint32) QueryDirectRenderingCapableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'QueryDirectRenderingCapable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryDirectRenderingCapable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1066,6 +1127,8 @@ func QueryDirectRenderingCapable(c *xgb.Conn, Screen uint32) QueryDirectRenderin
|
||||||
// QueryDirectRenderingCapableUnchecked sends an unchecked request.
|
// QueryDirectRenderingCapableUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryDirectRenderingCapableUnchecked(c *xgb.Conn, Screen uint32) QueryDirectRenderingCapableCookie {
|
func QueryDirectRenderingCapableUnchecked(c *xgb.Conn, Screen uint32) QueryDirectRenderingCapableCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'QueryDirectRenderingCapable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryDirectRenderingCapable' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1124,7 +1187,9 @@ func queryDirectRenderingCapableRequest(c *xgb.Conn, Screen uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -1147,6 +1212,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1158,6 +1225,8 @@ func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
if _, ok := c.Extensions["XFree86-DRI"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-DRI'. xf86dri.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1220,7 +1289,9 @@ func queryVersionRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-DRI"]
|
buf[b] = c.Extensions["XFree86-DRI"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XFree86-VidModeExtension could be found on on the server.")
|
return xgb.Errorf("No extension named XFree86-VidModeExtension could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XFree86-VidModeExtension"] = reply.MajorOpcode
|
c.Extensions["XFree86-VidModeExtension"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XFree86-VidModeExtension"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XFree86-VidModeExtension"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XFree86-VidModeExtension"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XFree86-VidModeExtension"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,6 +553,8 @@ type AddModeLineCookie struct {
|
||||||
// AddModeLine sends an unchecked request.
|
// AddModeLine sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func AddModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay uint16, AfterHsyncstart uint16, AfterHsyncend uint16, AfterHtotal uint16, AfterHskew uint16, AfterVdisplay uint16, AfterVsyncstart uint16, AfterVsyncend uint16, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie {
|
func AddModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay uint16, AfterHsyncstart uint16, AfterHsyncend uint16, AfterHtotal uint16, AfterHskew uint16, AfterVdisplay uint16, AfterVsyncstart uint16, AfterVsyncend uint16, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'AddModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AddModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -565,6 +566,8 @@ func AddModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16,
|
||||||
// AddModeLineChecked sends a checked request.
|
// AddModeLineChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using AddModeLineCookie.Check()
|
// If an error occurs, it can be retrieved using AddModeLineCookie.Check()
|
||||||
func AddModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay uint16, AfterHsyncstart uint16, AfterHsyncend uint16, AfterHtotal uint16, AfterHskew uint16, AfterVdisplay uint16, AfterVsyncstart uint16, AfterVsyncend uint16, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie {
|
func AddModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay uint16, AfterHsyncstart uint16, AfterHsyncend uint16, AfterHtotal uint16, AfterHskew uint16, AfterVdisplay uint16, AfterVsyncstart uint16, AfterVsyncend uint16, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'AddModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'AddModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -586,7 +589,9 @@ func addModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -689,6 +694,8 @@ type DeleteModeLineCookie struct {
|
||||||
// DeleteModeLine sends an unchecked request.
|
// DeleteModeLine sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DeleteModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) DeleteModeLineCookie {
|
func DeleteModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) DeleteModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'DeleteModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DeleteModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -700,6 +707,8 @@ func DeleteModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint
|
||||||
// DeleteModeLineChecked sends a checked request.
|
// DeleteModeLineChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DeleteModeLineCookie.Check()
|
// If an error occurs, it can be retrieved using DeleteModeLineCookie.Check()
|
||||||
func DeleteModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) DeleteModeLineCookie {
|
func DeleteModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) DeleteModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'DeleteModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DeleteModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -721,7 +730,9 @@ func deleteModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdispl
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -787,6 +798,8 @@ type GetAllModeLinesCookie struct {
|
||||||
// GetAllModeLines sends a checked request.
|
// GetAllModeLines sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetAllModeLinesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetAllModeLinesCookie.Reply()
|
||||||
func GetAllModeLines(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie {
|
func GetAllModeLines(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetAllModeLines' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetAllModeLines' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -798,6 +811,8 @@ func GetAllModeLines(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie {
|
||||||
// GetAllModeLinesUnchecked sends an unchecked request.
|
// GetAllModeLinesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetAllModeLinesUnchecked(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie {
|
func GetAllModeLinesUnchecked(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetAllModeLines' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetAllModeLines' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -859,7 +874,9 @@ func getAllModeLinesRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -884,6 +901,8 @@ type GetDotClocksCookie struct {
|
||||||
// GetDotClocks sends a checked request.
|
// GetDotClocks sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetDotClocksCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetDotClocksCookie.Reply()
|
||||||
func GetDotClocks(c *xgb.Conn, Screen uint16) GetDotClocksCookie {
|
func GetDotClocks(c *xgb.Conn, Screen uint16) GetDotClocksCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetDotClocks' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDotClocks' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -895,6 +914,8 @@ func GetDotClocks(c *xgb.Conn, Screen uint16) GetDotClocksCookie {
|
||||||
// GetDotClocksUnchecked sends an unchecked request.
|
// GetDotClocksUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetDotClocksUnchecked(c *xgb.Conn, Screen uint16) GetDotClocksCookie {
|
func GetDotClocksUnchecked(c *xgb.Conn, Screen uint16) GetDotClocksCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetDotClocks' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDotClocks' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -967,7 +988,9 @@ func getDotClocksRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 13 // request opcode
|
buf[b] = 13 // request opcode
|
||||||
|
@ -992,6 +1015,8 @@ type GetGammaCookie struct {
|
||||||
// GetGamma sends a checked request.
|
// GetGamma sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetGammaCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetGammaCookie.Reply()
|
||||||
func GetGamma(c *xgb.Conn, Screen uint16) GetGammaCookie {
|
func GetGamma(c *xgb.Conn, Screen uint16) GetGammaCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1003,6 +1028,8 @@ func GetGamma(c *xgb.Conn, Screen uint16) GetGammaCookie {
|
||||||
// GetGammaUnchecked sends an unchecked request.
|
// GetGammaUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetGammaUnchecked(c *xgb.Conn, Screen uint16) GetGammaCookie {
|
func GetGammaUnchecked(c *xgb.Conn, Screen uint16) GetGammaCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1068,7 +1095,9 @@ func getGammaRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 16 // request opcode
|
buf[b] = 16 // request opcode
|
||||||
|
@ -1093,6 +1122,8 @@ type GetGammaRampCookie struct {
|
||||||
// GetGammaRamp sends a checked request.
|
// GetGammaRamp sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetGammaRampCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetGammaRampCookie.Reply()
|
||||||
func GetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie {
|
func GetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1104,6 +1135,8 @@ func GetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie {
|
||||||
// GetGammaRampUnchecked sends an unchecked request.
|
// GetGammaRampUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetGammaRampUnchecked(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie {
|
func GetGammaRampUnchecked(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1188,7 +1221,9 @@ func getGammaRampRequest(c *xgb.Conn, Screen uint16, Size uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 17 // request opcode
|
buf[b] = 17 // request opcode
|
||||||
|
@ -1214,6 +1249,8 @@ type GetGammaRampSizeCookie struct {
|
||||||
// GetGammaRampSize sends a checked request.
|
// GetGammaRampSize sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetGammaRampSizeCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetGammaRampSizeCookie.Reply()
|
||||||
func GetGammaRampSize(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie {
|
func GetGammaRampSize(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetGammaRampSize' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetGammaRampSize' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1225,6 +1262,8 @@ func GetGammaRampSize(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie {
|
||||||
// GetGammaRampSizeUnchecked sends an unchecked request.
|
// GetGammaRampSizeUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetGammaRampSizeUnchecked(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie {
|
func GetGammaRampSizeUnchecked(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetGammaRampSize' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetGammaRampSize' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1282,7 +1321,9 @@ func getGammaRampSizeRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 19 // request opcode
|
buf[b] = 19 // request opcode
|
||||||
|
@ -1307,6 +1348,8 @@ type GetModeLineCookie struct {
|
||||||
// GetModeLine sends a checked request.
|
// GetModeLine sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetModeLineCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetModeLineCookie.Reply()
|
||||||
func GetModeLine(c *xgb.Conn, Screen uint16) GetModeLineCookie {
|
func GetModeLine(c *xgb.Conn, Screen uint16) GetModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1318,6 +1361,8 @@ func GetModeLine(c *xgb.Conn, Screen uint16) GetModeLineCookie {
|
||||||
// GetModeLineUnchecked sends an unchecked request.
|
// GetModeLineUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetModeLineUnchecked(c *xgb.Conn, Screen uint16) GetModeLineCookie {
|
func GetModeLineUnchecked(c *xgb.Conn, Screen uint16) GetModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1427,7 +1472,9 @@ func getModeLineRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -1452,6 +1499,8 @@ type GetMonitorCookie struct {
|
||||||
// GetMonitor sends a checked request.
|
// GetMonitor sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetMonitorCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetMonitorCookie.Reply()
|
||||||
func GetMonitor(c *xgb.Conn, Screen uint16) GetMonitorCookie {
|
func GetMonitor(c *xgb.Conn, Screen uint16) GetMonitorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetMonitor' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetMonitor' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1463,6 +1512,8 @@ func GetMonitor(c *xgb.Conn, Screen uint16) GetMonitorCookie {
|
||||||
// GetMonitorUnchecked sends an unchecked request.
|
// GetMonitorUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetMonitorUnchecked(c *xgb.Conn, Screen uint16) GetMonitorCookie {
|
func GetMonitorUnchecked(c *xgb.Conn, Screen uint16) GetMonitorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetMonitor' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetMonitor' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1570,7 +1621,9 @@ func getMonitorRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -1595,6 +1648,8 @@ type GetPermissionsCookie struct {
|
||||||
// GetPermissions sends a checked request.
|
// GetPermissions sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetPermissionsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetPermissionsCookie.Reply()
|
||||||
func GetPermissions(c *xgb.Conn, Screen uint16) GetPermissionsCookie {
|
func GetPermissions(c *xgb.Conn, Screen uint16) GetPermissionsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetPermissions' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPermissions' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1606,6 +1661,8 @@ func GetPermissions(c *xgb.Conn, Screen uint16) GetPermissionsCookie {
|
||||||
// GetPermissionsUnchecked sends an unchecked request.
|
// GetPermissionsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetPermissionsUnchecked(c *xgb.Conn, Screen uint16) GetPermissionsCookie {
|
func GetPermissionsUnchecked(c *xgb.Conn, Screen uint16) GetPermissionsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetPermissions' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPermissions' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1663,7 +1720,9 @@ func getPermissionsRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 20 // request opcode
|
buf[b] = 20 // request opcode
|
||||||
|
@ -1688,6 +1747,8 @@ type GetViewPortCookie struct {
|
||||||
// GetViewPort sends a checked request.
|
// GetViewPort sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetViewPortCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetViewPortCookie.Reply()
|
||||||
func GetViewPort(c *xgb.Conn, Screen uint16) GetViewPortCookie {
|
func GetViewPort(c *xgb.Conn, Screen uint16) GetViewPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1699,6 +1760,8 @@ func GetViewPort(c *xgb.Conn, Screen uint16) GetViewPortCookie {
|
||||||
// GetViewPortUnchecked sends an unchecked request.
|
// GetViewPortUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetViewPortUnchecked(c *xgb.Conn, Screen uint16) GetViewPortCookie {
|
func GetViewPortUnchecked(c *xgb.Conn, Screen uint16) GetViewPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'GetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1760,7 +1823,9 @@ func getViewPortRequest(c *xgb.Conn, Screen uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
@ -1785,6 +1850,8 @@ type LockModeSwitchCookie struct {
|
||||||
// LockModeSwitch sends an unchecked request.
|
// LockModeSwitch sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func LockModeSwitch(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCookie {
|
func LockModeSwitch(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'LockModeSwitch' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'LockModeSwitch' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1796,6 +1863,8 @@ func LockModeSwitch(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCooki
|
||||||
// LockModeSwitchChecked sends a checked request.
|
// LockModeSwitchChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using LockModeSwitchCookie.Check()
|
// If an error occurs, it can be retrieved using LockModeSwitchCookie.Check()
|
||||||
func LockModeSwitchChecked(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCookie {
|
func LockModeSwitchChecked(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'LockModeSwitch' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'LockModeSwitch' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1817,7 +1886,9 @@ func lockModeSwitchRequest(c *xgb.Conn, Screen uint16, Lock uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -1843,6 +1914,8 @@ type ModModeLineCookie struct {
|
||||||
// ModModeLine sends an unchecked request.
|
// ModModeLine sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ModModeLine(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ModModeLineCookie {
|
func ModModeLine(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ModModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'ModModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ModModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1854,6 +1927,8 @@ func ModModeLine(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16,
|
||||||
// ModModeLineChecked sends a checked request.
|
// ModModeLineChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ModModeLineCookie.Check()
|
// If an error occurs, it can be retrieved using ModModeLineCookie.Check()
|
||||||
func ModModeLineChecked(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ModModeLineCookie {
|
func ModModeLineChecked(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ModModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'ModModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ModModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1875,7 +1950,9 @@ func modModeLineRequest(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -1938,6 +2015,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1949,6 +2028,8 @@ func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2007,7 +2088,9 @@ func queryVersionRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -2027,6 +2110,8 @@ type SetClientVersionCookie struct {
|
||||||
// SetClientVersion sends an unchecked request.
|
// SetClientVersion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetClientVersion(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionCookie {
|
func SetClientVersion(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetClientVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetClientVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2038,6 +2123,8 @@ func SetClientVersion(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionC
|
||||||
// SetClientVersionChecked sends a checked request.
|
// SetClientVersionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetClientVersionCookie.Check()
|
// If an error occurs, it can be retrieved using SetClientVersionCookie.Check()
|
||||||
func SetClientVersionChecked(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionCookie {
|
func SetClientVersionChecked(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetClientVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetClientVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2059,7 +2146,9 @@ func setClientVersionRequest(c *xgb.Conn, Major uint16, Minor uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 14 // request opcode
|
buf[b] = 14 // request opcode
|
||||||
|
@ -2085,6 +2174,8 @@ type SetGammaCookie struct {
|
||||||
// SetGamma sends an unchecked request.
|
// SetGamma sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetGamma(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) SetGammaCookie {
|
func SetGamma(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) SetGammaCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2096,6 +2187,8 @@ func SetGamma(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32)
|
||||||
// SetGammaChecked sends a checked request.
|
// SetGammaChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetGammaCookie.Check()
|
// If an error occurs, it can be retrieved using SetGammaCookie.Check()
|
||||||
func SetGammaChecked(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) SetGammaCookie {
|
func SetGammaChecked(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) SetGammaCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2117,7 +2210,9 @@ func setGammaRequest(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 15 // request opcode
|
buf[b] = 15 // request opcode
|
||||||
|
@ -2153,6 +2248,8 @@ type SetGammaRampCookie struct {
|
||||||
// SetGammaRamp sends an unchecked request.
|
// SetGammaRamp sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetGammaRampCookie {
|
func SetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetGammaRampCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2164,6 +2261,8 @@ func SetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green [
|
||||||
// SetGammaRampChecked sends a checked request.
|
// SetGammaRampChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetGammaRampCookie.Check()
|
// If an error occurs, it can be retrieved using SetGammaRampCookie.Check()
|
||||||
func SetGammaRampChecked(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetGammaRampCookie {
|
func SetGammaRampChecked(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetGammaRampCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2185,7 +2284,9 @@ func setGammaRampRequest(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16,
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 18 // request opcode
|
buf[b] = 18 // request opcode
|
||||||
|
@ -2232,6 +2333,8 @@ type SetViewPortCookie struct {
|
||||||
// SetViewPort sends an unchecked request.
|
// SetViewPort sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetViewPort(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCookie {
|
func SetViewPort(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2243,6 +2346,8 @@ func SetViewPort(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCook
|
||||||
// SetViewPortChecked sends a checked request.
|
// SetViewPortChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetViewPortCookie.Check()
|
// If an error occurs, it can be retrieved using SetViewPortCookie.Check()
|
||||||
func SetViewPortChecked(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCookie {
|
func SetViewPortChecked(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2264,7 +2369,9 @@ func setViewPortRequest(c *xgb.Conn, Screen uint16, X uint32, Y uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 12 // request opcode
|
buf[b] = 12 // request opcode
|
||||||
|
@ -2295,6 +2402,8 @@ type SwitchModeCookie struct {
|
||||||
// SwitchMode sends an unchecked request.
|
// SwitchMode sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SwitchMode(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie {
|
func SwitchMode(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SwitchMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwitchMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2306,6 +2415,8 @@ func SwitchMode(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie {
|
||||||
// SwitchModeChecked sends a checked request.
|
// SwitchModeChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SwitchModeCookie.Check()
|
// If an error occurs, it can be retrieved using SwitchModeCookie.Check()
|
||||||
func SwitchModeChecked(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie {
|
func SwitchModeChecked(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SwitchMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwitchMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2327,7 +2438,9 @@ func switchModeRequest(c *xgb.Conn, Screen uint16, Zoom uint16) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -2353,6 +2466,8 @@ type SwitchToModeCookie struct {
|
||||||
// SwitchToMode sends an unchecked request.
|
// SwitchToMode sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SwitchToMode(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) SwitchToModeCookie {
|
func SwitchToMode(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) SwitchToModeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SwitchToMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwitchToMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2364,6 +2479,8 @@ func SwitchToMode(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16
|
||||||
// SwitchToModeChecked sends a checked request.
|
// SwitchToModeChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SwitchToModeCookie.Check()
|
// If an error occurs, it can be retrieved using SwitchToModeCookie.Check()
|
||||||
func SwitchToModeChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) SwitchToModeCookie {
|
func SwitchToModeChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) SwitchToModeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'SwitchToMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SwitchToMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2385,7 +2502,9 @@ func switchToModeRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -2451,6 +2570,8 @@ type ValidateModeLineCookie struct {
|
||||||
// ValidateModeLine sends a checked request.
|
// ValidateModeLine sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling ValidateModeLineCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling ValidateModeLineCookie.Reply()
|
||||||
func ValidateModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ValidateModeLineCookie {
|
func ValidateModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ValidateModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'ValidateModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ValidateModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2462,6 +2583,8 @@ func ValidateModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay ui
|
||||||
// ValidateModeLineUnchecked sends an unchecked request.
|
// ValidateModeLineUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ValidateModeLineUnchecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ValidateModeLineCookie {
|
func ValidateModeLineUnchecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ValidateModeLineCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok {
|
||||||
panic("Cannot issue request 'ValidateModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ValidateModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2519,7 +2642,9 @@ func validateModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdis
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
buf[b] = c.Extensions["XFree86-VidModeExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 9 // request opcode
|
buf[b] = 9 // request opcode
|
||||||
|
|
|
@ -21,16 +21,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XFIXES could be found on on the server.")
|
return xgb.Errorf("No extension named XFIXES could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XFIXES"] = reply.MajorOpcode
|
c.Extensions["XFIXES"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XFIXES"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XFIXES"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XFIXES"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XFIXES"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,10 +101,6 @@ const (
|
||||||
BarrierDirectionsNegativeY = 8
|
BarrierDirectionsNegativeY = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
CursorNotifyDisplayCursor = 0
|
|
||||||
)
|
|
||||||
|
|
||||||
// CursorNotify is the event number for a CursorNotifyEvent.
|
// CursorNotify is the event number for a CursorNotifyEvent.
|
||||||
const CursorNotify = 1
|
const CursorNotify = 1
|
||||||
|
|
||||||
|
@ -201,6 +196,10 @@ func init() {
|
||||||
xgb.NewExtEventFuncs["XFIXES"][1] = CursorNotifyEventNew
|
xgb.NewExtEventFuncs["XFIXES"][1] = CursorNotifyEventNew
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
CursorNotifyDisplayCursor = 0
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CursorNotifyMaskDisplayCursor = 1
|
CursorNotifyMaskDisplayCursor = 1
|
||||||
)
|
)
|
||||||
|
@ -381,6 +380,8 @@ type ChangeCursorCookie struct {
|
||||||
// ChangeCursor sends an unchecked request.
|
// ChangeCursor sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ChangeCursor(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) ChangeCursorCookie {
|
func ChangeCursor(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) ChangeCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ChangeCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangeCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -392,6 +393,8 @@ func ChangeCursor(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor)
|
||||||
// ChangeCursorChecked sends a checked request.
|
// ChangeCursorChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ChangeCursorCookie.Check()
|
// If an error occurs, it can be retrieved using ChangeCursorCookie.Check()
|
||||||
func ChangeCursorChecked(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) ChangeCursorCookie {
|
func ChangeCursorChecked(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) ChangeCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ChangeCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangeCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -413,7 +416,9 @@ func changeCursorRequest(c *xgb.Conn, Source xproto.Cursor, Destination xproto.C
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 26 // request opcode
|
buf[b] = 26 // request opcode
|
||||||
|
@ -439,6 +444,8 @@ type ChangeCursorByNameCookie struct {
|
||||||
// ChangeCursorByName sends an unchecked request.
|
// ChangeCursorByName sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ChangeCursorByName(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) ChangeCursorByNameCookie {
|
func ChangeCursorByName(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) ChangeCursorByNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ChangeCursorByName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangeCursorByName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -450,6 +457,8 @@ func ChangeCursorByName(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name stri
|
||||||
// ChangeCursorByNameChecked sends a checked request.
|
// ChangeCursorByNameChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ChangeCursorByNameCookie.Check()
|
// If an error occurs, it can be retrieved using ChangeCursorByNameCookie.Check()
|
||||||
func ChangeCursorByNameChecked(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) ChangeCursorByNameCookie {
|
func ChangeCursorByNameChecked(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) ChangeCursorByNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ChangeCursorByName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangeCursorByName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -471,7 +480,9 @@ func changeCursorByNameRequest(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Na
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 27 // request opcode
|
buf[b] = 27 // request opcode
|
||||||
|
@ -502,6 +513,8 @@ type ChangeSaveSetCookie struct {
|
||||||
// ChangeSaveSet sends an unchecked request.
|
// ChangeSaveSet sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ChangeSaveSet(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.Window) ChangeSaveSetCookie {
|
func ChangeSaveSet(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.Window) ChangeSaveSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ChangeSaveSet' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangeSaveSet' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -513,6 +526,8 @@ func ChangeSaveSet(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.
|
||||||
// ChangeSaveSetChecked sends a checked request.
|
// ChangeSaveSetChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ChangeSaveSetCookie.Check()
|
// If an error occurs, it can be retrieved using ChangeSaveSetCookie.Check()
|
||||||
func ChangeSaveSetChecked(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.Window) ChangeSaveSetCookie {
|
func ChangeSaveSetChecked(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.Window) ChangeSaveSetCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ChangeSaveSet' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ChangeSaveSet' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -534,7 +549,9 @@ func changeSaveSetRequest(c *xgb.Conn, Mode byte, Target byte, Map byte, Window
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -568,6 +585,8 @@ type CopyRegionCookie struct {
|
||||||
// CopyRegion sends an unchecked request.
|
// CopyRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CopyRegion(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie {
|
func CopyRegion(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -579,6 +598,8 @@ func CopyRegion(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie
|
||||||
// CopyRegionChecked sends a checked request.
|
// CopyRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CopyRegionCookie.Check()
|
// If an error occurs, it can be retrieved using CopyRegionCookie.Check()
|
||||||
func CopyRegionChecked(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie {
|
func CopyRegionChecked(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -600,7 +621,9 @@ func copyRegionRequest(c *xgb.Conn, Source Region, Destination Region) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 12 // request opcode
|
buf[b] = 12 // request opcode
|
||||||
|
@ -626,6 +649,8 @@ type CreatePointerBarrierCookie struct {
|
||||||
// CreatePointerBarrier sends an unchecked request.
|
// CreatePointerBarrier sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreatePointerBarrier(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 uint16, Y1 uint16, X2 uint16, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie {
|
func CreatePointerBarrier(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 uint16, Y1 uint16, X2 uint16, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreatePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreatePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -637,6 +662,8 @@ func CreatePointerBarrier(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1
|
||||||
// CreatePointerBarrierChecked sends a checked request.
|
// CreatePointerBarrierChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreatePointerBarrierCookie.Check()
|
// If an error occurs, it can be retrieved using CreatePointerBarrierCookie.Check()
|
||||||
func CreatePointerBarrierChecked(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 uint16, Y1 uint16, X2 uint16, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie {
|
func CreatePointerBarrierChecked(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 uint16, Y1 uint16, X2 uint16, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreatePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreatePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -658,7 +685,9 @@ func createPointerBarrierRequest(c *xgb.Conn, Barrier Barrier, Window xproto.Win
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 31 // request opcode
|
buf[b] = 31 // request opcode
|
||||||
|
@ -709,6 +738,8 @@ type CreateRegionCookie struct {
|
||||||
// CreateRegion sends an unchecked request.
|
// CreateRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) CreateRegionCookie {
|
func CreateRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) CreateRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -720,6 +751,8 @@ func CreateRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) Cre
|
||||||
// CreateRegionChecked sends a checked request.
|
// CreateRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateRegionCookie.Check()
|
// If an error occurs, it can be retrieved using CreateRegionCookie.Check()
|
||||||
func CreateRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) CreateRegionCookie {
|
func CreateRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) CreateRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -741,7 +774,9 @@ func createRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectang
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -766,6 +801,8 @@ type CreateRegionFromBitmapCookie struct {
|
||||||
// CreateRegionFromBitmap sends an unchecked request.
|
// CreateRegionFromBitmap sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateRegionFromBitmap(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) CreateRegionFromBitmapCookie {
|
func CreateRegionFromBitmap(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) CreateRegionFromBitmapCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromBitmap' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromBitmap' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -777,6 +814,8 @@ func CreateRegionFromBitmap(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) Cr
|
||||||
// CreateRegionFromBitmapChecked sends a checked request.
|
// CreateRegionFromBitmapChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateRegionFromBitmapCookie.Check()
|
// If an error occurs, it can be retrieved using CreateRegionFromBitmapCookie.Check()
|
||||||
func CreateRegionFromBitmapChecked(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) CreateRegionFromBitmapCookie {
|
func CreateRegionFromBitmapChecked(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) CreateRegionFromBitmapCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromBitmap' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromBitmap' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -798,7 +837,9 @@ func createRegionFromBitmapRequest(c *xgb.Conn, Region Region, Bitmap xproto.Pix
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -824,6 +865,8 @@ type CreateRegionFromGCCookie struct {
|
||||||
// CreateRegionFromGC sends an unchecked request.
|
// CreateRegionFromGC sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateRegionFromGC(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRegionFromGCCookie {
|
func CreateRegionFromGC(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRegionFromGCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromGC' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromGC' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -835,6 +878,8 @@ func CreateRegionFromGC(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRe
|
||||||
// CreateRegionFromGCChecked sends a checked request.
|
// CreateRegionFromGCChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateRegionFromGCCookie.Check()
|
// If an error occurs, it can be retrieved using CreateRegionFromGCCookie.Check()
|
||||||
func CreateRegionFromGCChecked(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRegionFromGCCookie {
|
func CreateRegionFromGCChecked(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRegionFromGCCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromGC' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromGC' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -856,7 +901,9 @@ func createRegionFromGCRequest(c *xgb.Conn, Region Region, Gc xproto.Gcontext) [
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -882,6 +929,8 @@ type CreateRegionFromPictureCookie struct {
|
||||||
// CreateRegionFromPicture sends an unchecked request.
|
// CreateRegionFromPicture sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateRegionFromPicture(c *xgb.Conn, Region Region, Picture render.Picture) CreateRegionFromPictureCookie {
|
func CreateRegionFromPicture(c *xgb.Conn, Region Region, Picture render.Picture) CreateRegionFromPictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromPicture' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromPicture' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -893,6 +942,8 @@ func CreateRegionFromPicture(c *xgb.Conn, Region Region, Picture render.Picture)
|
||||||
// CreateRegionFromPictureChecked sends a checked request.
|
// CreateRegionFromPictureChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateRegionFromPictureCookie.Check()
|
// If an error occurs, it can be retrieved using CreateRegionFromPictureCookie.Check()
|
||||||
func CreateRegionFromPictureChecked(c *xgb.Conn, Region Region, Picture render.Picture) CreateRegionFromPictureCookie {
|
func CreateRegionFromPictureChecked(c *xgb.Conn, Region Region, Picture render.Picture) CreateRegionFromPictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromPicture' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromPicture' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -914,7 +965,9 @@ func createRegionFromPictureRequest(c *xgb.Conn, Region Region, Picture render.P
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 9 // request opcode
|
buf[b] = 9 // request opcode
|
||||||
|
@ -940,6 +993,8 @@ type CreateRegionFromWindowCookie struct {
|
||||||
// CreateRegionFromWindow sends an unchecked request.
|
// CreateRegionFromWindow sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateRegionFromWindow(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) CreateRegionFromWindowCookie {
|
func CreateRegionFromWindow(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) CreateRegionFromWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromWindow' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromWindow' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -951,6 +1006,8 @@ func CreateRegionFromWindow(c *xgb.Conn, Region Region, Window xproto.Window, Ki
|
||||||
// CreateRegionFromWindowChecked sends a checked request.
|
// CreateRegionFromWindowChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateRegionFromWindowCookie.Check()
|
// If an error occurs, it can be retrieved using CreateRegionFromWindowCookie.Check()
|
||||||
func CreateRegionFromWindowChecked(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) CreateRegionFromWindowCookie {
|
func CreateRegionFromWindowChecked(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) CreateRegionFromWindowCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'CreateRegionFromWindow' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateRegionFromWindow' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -972,7 +1029,9 @@ func createRegionFromWindowRequest(c *xgb.Conn, Region Region, Window xproto.Win
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -1003,6 +1062,8 @@ type DeletePointerBarrierCookie struct {
|
||||||
// DeletePointerBarrier sends an unchecked request.
|
// DeletePointerBarrier sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DeletePointerBarrier(c *xgb.Conn, Barrier Barrier) DeletePointerBarrierCookie {
|
func DeletePointerBarrier(c *xgb.Conn, Barrier Barrier) DeletePointerBarrierCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'DeletePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DeletePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1014,6 +1075,8 @@ func DeletePointerBarrier(c *xgb.Conn, Barrier Barrier) DeletePointerBarrierCook
|
||||||
// DeletePointerBarrierChecked sends a checked request.
|
// DeletePointerBarrierChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DeletePointerBarrierCookie.Check()
|
// If an error occurs, it can be retrieved using DeletePointerBarrierCookie.Check()
|
||||||
func DeletePointerBarrierChecked(c *xgb.Conn, Barrier Barrier) DeletePointerBarrierCookie {
|
func DeletePointerBarrierChecked(c *xgb.Conn, Barrier Barrier) DeletePointerBarrierCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'DeletePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DeletePointerBarrier' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1035,7 +1098,9 @@ func deletePointerBarrierRequest(c *xgb.Conn, Barrier Barrier) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 32 // request opcode
|
buf[b] = 32 // request opcode
|
||||||
|
@ -1058,6 +1123,8 @@ type DestroyRegionCookie struct {
|
||||||
// DestroyRegion sends an unchecked request.
|
// DestroyRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DestroyRegion(c *xgb.Conn, Region Region) DestroyRegionCookie {
|
func DestroyRegion(c *xgb.Conn, Region Region) DestroyRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1069,6 +1136,8 @@ func DestroyRegion(c *xgb.Conn, Region Region) DestroyRegionCookie {
|
||||||
// DestroyRegionChecked sends a checked request.
|
// DestroyRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroyRegionCookie.Check()
|
// If an error occurs, it can be retrieved using DestroyRegionCookie.Check()
|
||||||
func DestroyRegionChecked(c *xgb.Conn, Region Region) DestroyRegionCookie {
|
func DestroyRegionChecked(c *xgb.Conn, Region Region) DestroyRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1090,7 +1159,9 @@ func destroyRegionRequest(c *xgb.Conn, Region Region) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -1113,6 +1184,8 @@ type ExpandRegionCookie struct {
|
||||||
// ExpandRegion sends an unchecked request.
|
// ExpandRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ExpandRegion(c *xgb.Conn, Source Region, Destination Region, Left uint16, Right uint16, Top uint16, Bottom uint16) ExpandRegionCookie {
|
func ExpandRegion(c *xgb.Conn, Source Region, Destination Region, Left uint16, Right uint16, Top uint16, Bottom uint16) ExpandRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ExpandRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ExpandRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1124,6 +1197,8 @@ func ExpandRegion(c *xgb.Conn, Source Region, Destination Region, Left uint16, R
|
||||||
// ExpandRegionChecked sends a checked request.
|
// ExpandRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ExpandRegionCookie.Check()
|
// If an error occurs, it can be retrieved using ExpandRegionCookie.Check()
|
||||||
func ExpandRegionChecked(c *xgb.Conn, Source Region, Destination Region, Left uint16, Right uint16, Top uint16, Bottom uint16) ExpandRegionCookie {
|
func ExpandRegionChecked(c *xgb.Conn, Source Region, Destination Region, Left uint16, Right uint16, Top uint16, Bottom uint16) ExpandRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ExpandRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ExpandRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1145,7 +1220,9 @@ func expandRegionRequest(c *xgb.Conn, Source Region, Destination Region, Left ui
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 28 // request opcode
|
buf[b] = 28 // request opcode
|
||||||
|
@ -1183,6 +1260,8 @@ type FetchRegionCookie struct {
|
||||||
// FetchRegion sends a checked request.
|
// FetchRegion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling FetchRegionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling FetchRegionCookie.Reply()
|
||||||
func FetchRegion(c *xgb.Conn, Region Region) FetchRegionCookie {
|
func FetchRegion(c *xgb.Conn, Region Region) FetchRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'FetchRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FetchRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1194,6 +1273,8 @@ func FetchRegion(c *xgb.Conn, Region Region) FetchRegionCookie {
|
||||||
// FetchRegionUnchecked sends an unchecked request.
|
// FetchRegionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func FetchRegionUnchecked(c *xgb.Conn, Region Region) FetchRegionCookie {
|
func FetchRegionUnchecked(c *xgb.Conn, Region Region) FetchRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'FetchRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FetchRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1255,7 +1336,9 @@ func fetchRegionRequest(c *xgb.Conn, Region Region) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 19 // request opcode
|
buf[b] = 19 // request opcode
|
||||||
|
@ -1278,6 +1361,8 @@ type GetCursorImageCookie struct {
|
||||||
// GetCursorImage sends a checked request.
|
// GetCursorImage sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetCursorImageCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetCursorImageCookie.Reply()
|
||||||
func GetCursorImage(c *xgb.Conn) GetCursorImageCookie {
|
func GetCursorImage(c *xgb.Conn) GetCursorImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'GetCursorImage' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetCursorImage' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1289,6 +1374,8 @@ func GetCursorImage(c *xgb.Conn) GetCursorImageCookie {
|
||||||
// GetCursorImageUnchecked sends an unchecked request.
|
// GetCursorImageUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetCursorImageUnchecked(c *xgb.Conn) GetCursorImageCookie {
|
func GetCursorImageUnchecked(c *xgb.Conn) GetCursorImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'GetCursorImage' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetCursorImage' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1377,7 +1464,9 @@ func getCursorImageRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -1397,6 +1486,8 @@ type GetCursorImageAndNameCookie struct {
|
||||||
// GetCursorImageAndName sends a checked request.
|
// GetCursorImageAndName sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetCursorImageAndNameCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetCursorImageAndNameCookie.Reply()
|
||||||
func GetCursorImageAndName(c *xgb.Conn) GetCursorImageAndNameCookie {
|
func GetCursorImageAndName(c *xgb.Conn) GetCursorImageAndNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'GetCursorImageAndName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetCursorImageAndName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1408,6 +1499,8 @@ func GetCursorImageAndName(c *xgb.Conn) GetCursorImageAndNameCookie {
|
||||||
// GetCursorImageAndNameUnchecked sends an unchecked request.
|
// GetCursorImageAndNameUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetCursorImageAndNameUnchecked(c *xgb.Conn) GetCursorImageAndNameCookie {
|
func GetCursorImageAndNameUnchecked(c *xgb.Conn) GetCursorImageAndNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'GetCursorImageAndName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetCursorImageAndName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1515,7 +1608,9 @@ func getCursorImageAndNameRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 25 // request opcode
|
buf[b] = 25 // request opcode
|
||||||
|
@ -1535,6 +1630,8 @@ type GetCursorNameCookie struct {
|
||||||
// GetCursorName sends a checked request.
|
// GetCursorName sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetCursorNameCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetCursorNameCookie.Reply()
|
||||||
func GetCursorName(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie {
|
func GetCursorName(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'GetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1546,6 +1643,8 @@ func GetCursorName(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie {
|
||||||
// GetCursorNameUnchecked sends an unchecked request.
|
// GetCursorNameUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetCursorNameUnchecked(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie {
|
func GetCursorNameUnchecked(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'GetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1615,7 +1714,9 @@ func getCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 24 // request opcode
|
buf[b] = 24 // request opcode
|
||||||
|
@ -1638,6 +1739,8 @@ type HideCursorCookie struct {
|
||||||
// HideCursor sends an unchecked request.
|
// HideCursor sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func HideCursor(c *xgb.Conn, Window xproto.Window) HideCursorCookie {
|
func HideCursor(c *xgb.Conn, Window xproto.Window) HideCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'HideCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'HideCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1649,6 +1752,8 @@ func HideCursor(c *xgb.Conn, Window xproto.Window) HideCursorCookie {
|
||||||
// HideCursorChecked sends a checked request.
|
// HideCursorChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using HideCursorCookie.Check()
|
// If an error occurs, it can be retrieved using HideCursorCookie.Check()
|
||||||
func HideCursorChecked(c *xgb.Conn, Window xproto.Window) HideCursorCookie {
|
func HideCursorChecked(c *xgb.Conn, Window xproto.Window) HideCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'HideCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'HideCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1670,7 +1775,9 @@ func hideCursorRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 29 // request opcode
|
buf[b] = 29 // request opcode
|
||||||
|
@ -1693,6 +1800,8 @@ type IntersectRegionCookie struct {
|
||||||
// IntersectRegion sends an unchecked request.
|
// IntersectRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func IntersectRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) IntersectRegionCookie {
|
func IntersectRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) IntersectRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'IntersectRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'IntersectRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1704,6 +1813,8 @@ func IntersectRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Re
|
||||||
// IntersectRegionChecked sends a checked request.
|
// IntersectRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using IntersectRegionCookie.Check()
|
// If an error occurs, it can be retrieved using IntersectRegionCookie.Check()
|
||||||
func IntersectRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) IntersectRegionCookie {
|
func IntersectRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) IntersectRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'IntersectRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'IntersectRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1725,7 +1836,9 @@ func intersectRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destina
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 14 // request opcode
|
buf[b] = 14 // request opcode
|
||||||
|
@ -1754,6 +1867,8 @@ type InvertRegionCookie struct {
|
||||||
// InvertRegion sends an unchecked request.
|
// InvertRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func InvertRegion(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) InvertRegionCookie {
|
func InvertRegion(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) InvertRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'InvertRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'InvertRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1765,6 +1880,8 @@ func InvertRegion(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destinati
|
||||||
// InvertRegionChecked sends a checked request.
|
// InvertRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using InvertRegionCookie.Check()
|
// If an error occurs, it can be retrieved using InvertRegionCookie.Check()
|
||||||
func InvertRegionChecked(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) InvertRegionCookie {
|
func InvertRegionChecked(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) InvertRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'InvertRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'InvertRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1786,7 +1903,9 @@ func invertRegionRequest(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, De
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 16 // request opcode
|
buf[b] = 16 // request opcode
|
||||||
|
@ -1818,6 +1937,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1829,6 +1950,8 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1890,7 +2013,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -1916,6 +2041,8 @@ type RegionExtentsCookie struct {
|
||||||
// RegionExtents sends an unchecked request.
|
// RegionExtents sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func RegionExtents(c *xgb.Conn, Source Region, Destination Region) RegionExtentsCookie {
|
func RegionExtents(c *xgb.Conn, Source Region, Destination Region) RegionExtentsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'RegionExtents' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RegionExtents' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1927,6 +2054,8 @@ func RegionExtents(c *xgb.Conn, Source Region, Destination Region) RegionExtents
|
||||||
// RegionExtentsChecked sends a checked request.
|
// RegionExtentsChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using RegionExtentsCookie.Check()
|
// If an error occurs, it can be retrieved using RegionExtentsCookie.Check()
|
||||||
func RegionExtentsChecked(c *xgb.Conn, Source Region, Destination Region) RegionExtentsCookie {
|
func RegionExtentsChecked(c *xgb.Conn, Source Region, Destination Region) RegionExtentsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'RegionExtents' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'RegionExtents' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1948,7 +2077,9 @@ func regionExtentsRequest(c *xgb.Conn, Source Region, Destination Region) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 18 // request opcode
|
buf[b] = 18 // request opcode
|
||||||
|
@ -1974,6 +2105,8 @@ type SelectCursorInputCookie struct {
|
||||||
// SelectCursorInput sends an unchecked request.
|
// SelectCursorInput sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SelectCursorInput(c *xgb.Conn, Window xproto.Window, EventMask uint32) SelectCursorInputCookie {
|
func SelectCursorInput(c *xgb.Conn, Window xproto.Window, EventMask uint32) SelectCursorInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SelectCursorInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectCursorInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1985,6 +2118,8 @@ func SelectCursorInput(c *xgb.Conn, Window xproto.Window, EventMask uint32) Sele
|
||||||
// SelectCursorInputChecked sends a checked request.
|
// SelectCursorInputChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SelectCursorInputCookie.Check()
|
// If an error occurs, it can be retrieved using SelectCursorInputCookie.Check()
|
||||||
func SelectCursorInputChecked(c *xgb.Conn, Window xproto.Window, EventMask uint32) SelectCursorInputCookie {
|
func SelectCursorInputChecked(c *xgb.Conn, Window xproto.Window, EventMask uint32) SelectCursorInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SelectCursorInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectCursorInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2006,7 +2141,9 @@ func selectCursorInputRequest(c *xgb.Conn, Window xproto.Window, EventMask uint3
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -2032,6 +2169,8 @@ type SelectSelectionInputCookie struct {
|
||||||
// SelectSelectionInput sends an unchecked request.
|
// SelectSelectionInput sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SelectSelectionInput(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) SelectSelectionInputCookie {
|
func SelectSelectionInput(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) SelectSelectionInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SelectSelectionInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectSelectionInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2043,6 +2182,8 @@ func SelectSelectionInput(c *xgb.Conn, Window xproto.Window, Selection xproto.At
|
||||||
// SelectSelectionInputChecked sends a checked request.
|
// SelectSelectionInputChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SelectSelectionInputCookie.Check()
|
// If an error occurs, it can be retrieved using SelectSelectionInputCookie.Check()
|
||||||
func SelectSelectionInputChecked(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) SelectSelectionInputCookie {
|
func SelectSelectionInputChecked(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) SelectSelectionInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SelectSelectionInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectSelectionInput' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2064,7 +2205,9 @@ func selectSelectionInputRequest(c *xgb.Conn, Window xproto.Window, Selection xp
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -2093,6 +2236,8 @@ type SetCursorNameCookie struct {
|
||||||
// SetCursorName sends an unchecked request.
|
// SetCursorName sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetCursorName(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) SetCursorNameCookie {
|
func SetCursorName(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) SetCursorNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2104,6 +2249,8 @@ func SetCursorName(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string
|
||||||
// SetCursorNameChecked sends a checked request.
|
// SetCursorNameChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetCursorNameCookie.Check()
|
// If an error occurs, it can be retrieved using SetCursorNameCookie.Check()
|
||||||
func SetCursorNameChecked(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) SetCursorNameCookie {
|
func SetCursorNameChecked(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) SetCursorNameCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetCursorName' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2125,7 +2272,9 @@ func setCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 23 // request opcode
|
buf[b] = 23 // request opcode
|
||||||
|
@ -2156,6 +2305,8 @@ type SetGCClipRegionCookie struct {
|
||||||
// SetGCClipRegion sends an unchecked request.
|
// SetGCClipRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetGCClipRegion(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int16, YOrigin int16) SetGCClipRegionCookie {
|
func SetGCClipRegion(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int16, YOrigin int16) SetGCClipRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetGCClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetGCClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2167,6 +2318,8 @@ func SetGCClipRegion(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int
|
||||||
// SetGCClipRegionChecked sends a checked request.
|
// SetGCClipRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetGCClipRegionCookie.Check()
|
// If an error occurs, it can be retrieved using SetGCClipRegionCookie.Check()
|
||||||
func SetGCClipRegionChecked(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int16, YOrigin int16) SetGCClipRegionCookie {
|
func SetGCClipRegionChecked(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int16, YOrigin int16) SetGCClipRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetGCClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetGCClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2188,7 +2341,9 @@ func setGCClipRegionRequest(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOri
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 20 // request opcode
|
buf[b] = 20 // request opcode
|
||||||
|
@ -2220,6 +2375,8 @@ type SetPictureClipRegionCookie struct {
|
||||||
// SetPictureClipRegion sends an unchecked request.
|
// SetPictureClipRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetPictureClipRegion(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin int16, YOrigin int16) SetPictureClipRegionCookie {
|
func SetPictureClipRegion(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin int16, YOrigin int16) SetPictureClipRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2231,6 +2388,8 @@ func SetPictureClipRegion(c *xgb.Conn, Picture render.Picture, Region Region, XO
|
||||||
// SetPictureClipRegionChecked sends a checked request.
|
// SetPictureClipRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetPictureClipRegionCookie.Check()
|
// If an error occurs, it can be retrieved using SetPictureClipRegionCookie.Check()
|
||||||
func SetPictureClipRegionChecked(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin int16, YOrigin int16) SetPictureClipRegionCookie {
|
func SetPictureClipRegionChecked(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin int16, YOrigin int16) SetPictureClipRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetPictureClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPictureClipRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2252,7 +2411,9 @@ func setPictureClipRegionRequest(c *xgb.Conn, Picture render.Picture, Region Reg
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 22 // request opcode
|
buf[b] = 22 // request opcode
|
||||||
|
@ -2284,6 +2445,8 @@ type SetRegionCookie struct {
|
||||||
// SetRegion sends an unchecked request.
|
// SetRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetRegionCookie {
|
func SetRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2295,6 +2458,8 @@ func SetRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetReg
|
||||||
// SetRegionChecked sends a checked request.
|
// SetRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetRegionCookie.Check()
|
// If an error occurs, it can be retrieved using SetRegionCookie.Check()
|
||||||
func SetRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetRegionCookie {
|
func SetRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2316,7 +2481,9 @@ func setRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
@ -2341,6 +2508,8 @@ type SetWindowShapeRegionCookie struct {
|
||||||
// SetWindowShapeRegion sends an unchecked request.
|
// SetWindowShapeRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetWindowShapeRegion(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset int16, YOffset int16, Region Region) SetWindowShapeRegionCookie {
|
func SetWindowShapeRegion(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset int16, YOffset int16, Region Region) SetWindowShapeRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetWindowShapeRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetWindowShapeRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2352,6 +2521,8 @@ func SetWindowShapeRegion(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind,
|
||||||
// SetWindowShapeRegionChecked sends a checked request.
|
// SetWindowShapeRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetWindowShapeRegionCookie.Check()
|
// If an error occurs, it can be retrieved using SetWindowShapeRegionCookie.Check()
|
||||||
func SetWindowShapeRegionChecked(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset int16, YOffset int16, Region Region) SetWindowShapeRegionCookie {
|
func SetWindowShapeRegionChecked(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset int16, YOffset int16, Region Region) SetWindowShapeRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SetWindowShapeRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetWindowShapeRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2373,7 +2544,9 @@ func setWindowShapeRegionRequest(c *xgb.Conn, Dest xproto.Window, DestKind shape
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 21 // request opcode
|
buf[b] = 21 // request opcode
|
||||||
|
@ -2410,6 +2583,8 @@ type ShowCursorCookie struct {
|
||||||
// ShowCursor sends an unchecked request.
|
// ShowCursor sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ShowCursor(c *xgb.Conn, Window xproto.Window) ShowCursorCookie {
|
func ShowCursor(c *xgb.Conn, Window xproto.Window) ShowCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ShowCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ShowCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2421,6 +2596,8 @@ func ShowCursor(c *xgb.Conn, Window xproto.Window) ShowCursorCookie {
|
||||||
// ShowCursorChecked sends a checked request.
|
// ShowCursorChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ShowCursorCookie.Check()
|
// If an error occurs, it can be retrieved using ShowCursorCookie.Check()
|
||||||
func ShowCursorChecked(c *xgb.Conn, Window xproto.Window) ShowCursorCookie {
|
func ShowCursorChecked(c *xgb.Conn, Window xproto.Window) ShowCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'ShowCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ShowCursor' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2442,7 +2619,9 @@ func showCursorRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 30 // request opcode
|
buf[b] = 30 // request opcode
|
||||||
|
@ -2465,6 +2644,8 @@ type SubtractRegionCookie struct {
|
||||||
// SubtractRegion sends an unchecked request.
|
// SubtractRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SubtractRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) SubtractRegionCookie {
|
func SubtractRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) SubtractRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SubtractRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SubtractRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2476,6 +2657,8 @@ func SubtractRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Reg
|
||||||
// SubtractRegionChecked sends a checked request.
|
// SubtractRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SubtractRegionCookie.Check()
|
// If an error occurs, it can be retrieved using SubtractRegionCookie.Check()
|
||||||
func SubtractRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) SubtractRegionCookie {
|
func SubtractRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) SubtractRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'SubtractRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SubtractRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2497,7 +2680,9 @@ func subtractRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destinat
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 15 // request opcode
|
buf[b] = 15 // request opcode
|
||||||
|
@ -2526,6 +2711,8 @@ type TranslateRegionCookie struct {
|
||||||
// TranslateRegion sends an unchecked request.
|
// TranslateRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func TranslateRegion(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRegionCookie {
|
func TranslateRegion(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'TranslateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'TranslateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2537,6 +2724,8 @@ func TranslateRegion(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRe
|
||||||
// TranslateRegionChecked sends a checked request.
|
// TranslateRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using TranslateRegionCookie.Check()
|
// If an error occurs, it can be retrieved using TranslateRegionCookie.Check()
|
||||||
func TranslateRegionChecked(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRegionCookie {
|
func TranslateRegionChecked(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'TranslateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'TranslateRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2558,7 +2747,9 @@ func translateRegionRequest(c *xgb.Conn, Region Region, Dx int16, Dy int16) []by
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 17 // request opcode
|
buf[b] = 17 // request opcode
|
||||||
|
@ -2587,6 +2778,8 @@ type UnionRegionCookie struct {
|
||||||
// UnionRegion sends an unchecked request.
|
// UnionRegion sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func UnionRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) UnionRegionCookie {
|
func UnionRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) UnionRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'UnionRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnionRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2598,6 +2791,8 @@ func UnionRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region
|
||||||
// UnionRegionChecked sends a checked request.
|
// UnionRegionChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using UnionRegionCookie.Check()
|
// If an error occurs, it can be retrieved using UnionRegionCookie.Check()
|
||||||
func UnionRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) UnionRegionCookie {
|
func UnionRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) UnionRegionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XFIXES"]; !ok {
|
if _, ok := c.Extensions["XFIXES"]; !ok {
|
||||||
panic("Cannot issue request 'UnionRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UnionRegion' using the uninitialized extension 'XFIXES'. xfixes.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2619,7 +2814,9 @@ func unionRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destination
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XFIXES"]
|
buf[b] = c.Extensions["XFIXES"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 13 // request opcode
|
buf[b] = 13 // request opcode
|
||||||
|
|
10
nexgb/xgb.go
10
nexgb/xgb.go
|
@ -13,11 +13,6 @@ var (
|
||||||
// Where to log error-messages. Defaults to stderr.
|
// Where to log error-messages. Defaults to stderr.
|
||||||
// To disable logging, just set this to log.New(ioutil.Discard, "", 0)
|
// To disable logging, just set this to log.New(ioutil.Discard, "", 0)
|
||||||
Logger = log.New(os.Stderr, "XGB: ", log.Lshortfile)
|
Logger = log.New(os.Stderr, "XGB: ", log.Lshortfile)
|
||||||
|
|
||||||
// ExtLock is a lock used whenever new extensions are initialized.
|
|
||||||
// It should not be used. It is exported for use in the extension
|
|
||||||
// sub-packages.
|
|
||||||
ExtLock sync.Mutex
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -66,6 +61,11 @@ type Conn struct {
|
||||||
seqChan chan uint16
|
seqChan chan uint16
|
||||||
reqChan chan *request
|
reqChan chan *request
|
||||||
closing chan chan struct{}
|
closing chan chan struct{}
|
||||||
|
|
||||||
|
// ExtLock is a lock used whenever new extensions are initialized.
|
||||||
|
// It should not be used. It is exported for use in the extension
|
||||||
|
// sub-packages.
|
||||||
|
ExtLock sync.RWMutex
|
||||||
|
|
||||||
// Extensions is a map from extension name to major opcode. It should
|
// Extensions is a map from extension name to major opcode. It should
|
||||||
// not be used. It is exported for use in the extension sub-packages.
|
// not be used. It is exported for use in the extension sub-packages.
|
||||||
|
|
|
@ -99,8 +99,9 @@ func (c *Context) Morph(xmlBytes []byte) {
|
||||||
"on the server.\")", xname)
|
"on the server.\")", xname)
|
||||||
c.Putln("}")
|
c.Putln("}")
|
||||||
c.Putln("")
|
c.Putln("")
|
||||||
c.Putln("xgb.ExtLock.Lock()")
|
c.Putln("c.ExtLock.Lock()")
|
||||||
c.Putln("c.Extensions[\"%s\"] = reply.MajorOpcode", xname)
|
c.Putln("c.Extensions[\"%s\"] = reply.MajorOpcode", xname)
|
||||||
|
c.Putln("c.ExtLock.Unlock()")
|
||||||
c.Putln("for evNum, fun := range xgb.NewExtEventFuncs[\"%s\"] {",
|
c.Putln("for evNum, fun := range xgb.NewExtEventFuncs[\"%s\"] {",
|
||||||
xname)
|
xname)
|
||||||
c.Putln("xgb.NewEventFuncs[int(reply.FirstEvent) + evNum] = fun")
|
c.Putln("xgb.NewEventFuncs[int(reply.FirstEvent) + evNum] = fun")
|
||||||
|
@ -109,8 +110,6 @@ func (c *Context) Morph(xmlBytes []byte) {
|
||||||
xname)
|
xname)
|
||||||
c.Putln("xgb.NewErrorFuncs[int(reply.FirstError) + errNum] = fun")
|
c.Putln("xgb.NewErrorFuncs[int(reply.FirstError) + errNum] = fun")
|
||||||
c.Putln("}")
|
c.Putln("}")
|
||||||
c.Putln("xgb.ExtLock.Unlock()")
|
|
||||||
c.Putln("")
|
|
||||||
c.Putln("return nil")
|
c.Putln("return nil")
|
||||||
c.Putln("}")
|
c.Putln("}")
|
||||||
c.Putln("")
|
c.Putln("")
|
||||||
|
|
|
@ -79,6 +79,8 @@ func (r *Request) CheckExt(c *Context) {
|
||||||
if !c.protocol.isExt() {
|
if !c.protocol.isExt() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
c.Putln("c.ExtLock.RLock()")
|
||||||
|
c.Putln("defer c.ExtLock.RUnlock()")
|
||||||
c.Putln("if _, ok := c.Extensions[\"%s\"]; !ok {", c.protocol.ExtXName)
|
c.Putln("if _, ok := c.Extensions[\"%s\"]; !ok {", c.protocol.ExtXName)
|
||||||
c.Putln("panic(\"Cannot issue request '%s' using the uninitialized "+
|
c.Putln("panic(\"Cannot issue request '%s' using the uninitialized "+
|
||||||
"extension '%s'. %s.Init(connObj) must be called first.\")",
|
"extension '%s'. %s.Init(connObj) must be called first.\")",
|
||||||
|
@ -169,7 +171,9 @@ func (r *Request) WriteRequest(c *Context) {
|
||||||
c.Putln("buf := make([]byte, size)")
|
c.Putln("buf := make([]byte, size)")
|
||||||
c.Putln("")
|
c.Putln("")
|
||||||
if c.protocol.isExt() {
|
if c.protocol.isExt() {
|
||||||
|
c.Putln("c.ExtLock.RLock()")
|
||||||
c.Putln("buf[b] = c.Extensions[\"%s\"]", c.protocol.ExtXName)
|
c.Putln("buf[b] = c.Extensions[\"%s\"]", c.protocol.ExtXName)
|
||||||
|
c.Putln("c.ExtLock.RUnlock()")
|
||||||
c.Putln("b += 1")
|
c.Putln("b += 1")
|
||||||
c.Putln("")
|
c.Putln("")
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XINERAMA could be found on on the server.")
|
return xgb.Errorf("No extension named XINERAMA could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XINERAMA"] = reply.MajorOpcode
|
c.Extensions["XINERAMA"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XINERAMA"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XINERAMA"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XINERAMA"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XINERAMA"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +136,8 @@ type GetScreenCountCookie struct {
|
||||||
// GetScreenCount sends a checked request.
|
// 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 {
|
func GetScreenCount(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'GetScreenCount' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetScreenCount' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -148,6 +149,8 @@ func GetScreenCount(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie {
|
||||||
// GetScreenCountUnchecked sends an unchecked request.
|
// GetScreenCountUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetScreenCountUnchecked(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie {
|
func GetScreenCountUnchecked(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'GetScreenCount' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetScreenCount' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -203,7 +206,9 @@ func getScreenCountRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XINERAMA"]
|
buf[b] = c.Extensions["XINERAMA"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -226,6 +231,8 @@ type GetScreenSizeCookie struct {
|
||||||
// GetScreenSize sends a checked request.
|
// 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 {
|
func GetScreenSize(c *xgb.Conn, Window xproto.Window, Screen uint32) GetScreenSizeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'GetScreenSize' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetScreenSize' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -237,6 +244,8 @@ func GetScreenSize(c *xgb.Conn, Window xproto.Window, Screen uint32) GetScreenSi
|
||||||
// GetScreenSizeUnchecked sends an unchecked request.
|
// GetScreenSizeUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetScreenSizeUnchecked(c *xgb.Conn, Window xproto.Window, Screen uint32) GetScreenSizeCookie {
|
func GetScreenSizeUnchecked(c *xgb.Conn, Window xproto.Window, Screen uint32) GetScreenSizeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'GetScreenSize' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetScreenSize' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -303,7 +312,9 @@ func getScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Screen uint32) []by
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XINERAMA"]
|
buf[b] = c.Extensions["XINERAMA"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -329,6 +340,8 @@ type GetStateCookie struct {
|
||||||
// GetState sends a checked request.
|
// 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 {
|
func GetState(c *xgb.Conn, Window xproto.Window) GetStateCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'GetState' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetState' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -340,6 +353,8 @@ func GetState(c *xgb.Conn, Window xproto.Window) GetStateCookie {
|
||||||
// GetStateUnchecked sends an unchecked request.
|
// GetStateUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetStateUnchecked(c *xgb.Conn, Window xproto.Window) GetStateCookie {
|
func GetStateUnchecked(c *xgb.Conn, Window xproto.Window) GetStateCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'GetState' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetState' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -395,7 +410,9 @@ func getStateRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XINERAMA"]
|
buf[b] = c.Extensions["XINERAMA"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -418,6 +435,8 @@ type IsActiveCookie struct {
|
||||||
// IsActive sends a checked request.
|
// 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 {
|
func IsActive(c *xgb.Conn) IsActiveCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'IsActive' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'IsActive' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -429,6 +448,8 @@ func IsActive(c *xgb.Conn) IsActiveCookie {
|
||||||
// IsActiveUnchecked sends an unchecked request.
|
// IsActiveUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func IsActiveUnchecked(c *xgb.Conn) IsActiveCookie {
|
func IsActiveUnchecked(c *xgb.Conn) IsActiveCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'IsActive' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'IsActive' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -483,7 +504,9 @@ func isActiveRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XINERAMA"]
|
buf[b] = c.Extensions["XINERAMA"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -503,6 +526,8 @@ type QueryScreensCookie struct {
|
||||||
// QueryScreens sends a checked request.
|
// 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 {
|
func QueryScreens(c *xgb.Conn) QueryScreensCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'QueryScreens' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryScreens' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -514,6 +539,8 @@ func QueryScreens(c *xgb.Conn) QueryScreensCookie {
|
||||||
// QueryScreensUnchecked sends an unchecked request.
|
// QueryScreensUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryScreensUnchecked(c *xgb.Conn) QueryScreensCookie {
|
func QueryScreensUnchecked(c *xgb.Conn) QueryScreensCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'QueryScreens' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryScreens' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -575,7 +602,9 @@ func queryScreensRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XINERAMA"]
|
buf[b] = c.Extensions["XINERAMA"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -595,6 +624,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// 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 {
|
func QueryVersion(c *xgb.Conn, Major byte, Minor byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -606,6 +637,8 @@ func QueryVersion(c *xgb.Conn, Major byte, Minor byte) QueryVersionCookie {
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// 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 byte, Minor byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
if _, ok := c.Extensions["XINERAMA"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XINERAMA'. xinerama.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -664,7 +697,9 @@ func queryVersionRequest(c *xgb.Conn, Major byte, Minor byte) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XINERAMA"]
|
buf[b] = c.Extensions["XINERAMA"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XpExtension could be found on on the server.")
|
return xgb.Errorf("No extension named XpExtension could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XpExtension"] = reply.MajorOpcode
|
c.Extensions["XpExtension"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XpExtension"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XpExtension"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XpExtension"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XpExtension"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,6 +437,8 @@ type CreateContextCookie struct {
|
||||||
// CreateContext sends an unchecked request.
|
// CreateContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie {
|
func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -449,6 +450,8 @@ func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleL
|
||||||
// CreateContextChecked sends a checked request.
|
// CreateContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using CreateContextCookie.Check()
|
// If an error occurs, it can be retrieved using CreateContextCookie.Check()
|
||||||
func CreateContextChecked(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie {
|
func CreateContextChecked(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -470,7 +473,9 @@ func createContextRequest(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32,
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -509,6 +514,8 @@ type PrintDestroyContextCookie struct {
|
||||||
// PrintDestroyContext sends an unchecked request.
|
// PrintDestroyContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
|
func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintDestroyContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintDestroyContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -520,6 +527,8 @@ func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie
|
||||||
// PrintDestroyContextChecked sends a checked request.
|
// PrintDestroyContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintDestroyContextCookie.Check()
|
// If an error occurs, it can be retrieved using PrintDestroyContextCookie.Check()
|
||||||
func PrintDestroyContextChecked(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
|
func PrintDestroyContextChecked(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintDestroyContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintDestroyContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -541,7 +550,9 @@ func printDestroyContextRequest(c *xgb.Conn, Context uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -564,6 +575,8 @@ type PrintEndDocCookie struct {
|
||||||
// PrintEndDoc sends an unchecked request.
|
// PrintEndDoc sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
|
func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintEndDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintEndDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -575,6 +588,8 @@ func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
|
||||||
// PrintEndDocChecked sends a checked request.
|
// PrintEndDocChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintEndDocCookie.Check()
|
// If an error occurs, it can be retrieved using PrintEndDocCookie.Check()
|
||||||
func PrintEndDocChecked(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
|
func PrintEndDocChecked(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintEndDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintEndDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -596,7 +611,9 @@ func printEndDocRequest(c *xgb.Conn, Cancel bool) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -623,6 +640,8 @@ type PrintEndJobCookie struct {
|
||||||
// PrintEndJob sends an unchecked request.
|
// PrintEndJob sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
|
func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintEndJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintEndJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -634,6 +653,8 @@ func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
|
||||||
// PrintEndJobChecked sends a checked request.
|
// PrintEndJobChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintEndJobCookie.Check()
|
// If an error occurs, it can be retrieved using PrintEndJobCookie.Check()
|
||||||
func PrintEndJobChecked(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
|
func PrintEndJobChecked(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintEndJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintEndJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -655,7 +676,9 @@ func printEndJobRequest(c *xgb.Conn, Cancel bool) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -682,6 +705,8 @@ type PrintEndPageCookie struct {
|
||||||
// PrintEndPage sends an unchecked request.
|
// PrintEndPage sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
|
func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintEndPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintEndPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -693,6 +718,8 @@ func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
|
||||||
// PrintEndPageChecked sends a checked request.
|
// PrintEndPageChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintEndPageCookie.Check()
|
// If an error occurs, it can be retrieved using PrintEndPageCookie.Check()
|
||||||
func PrintEndPageChecked(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
|
func PrintEndPageChecked(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintEndPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintEndPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -714,7 +741,9 @@ func printEndPageRequest(c *xgb.Conn, Cancel bool) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 14 // request opcode
|
buf[b] = 14 // request opcode
|
||||||
|
@ -743,6 +772,8 @@ type PrintGetAttributesCookie struct {
|
||||||
// PrintGetAttributes sends a checked request.
|
// PrintGetAttributes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetAttributesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetAttributesCookie.Reply()
|
||||||
func PrintGetAttributes(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie {
|
func PrintGetAttributes(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -754,6 +785,8 @@ func PrintGetAttributes(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttrib
|
||||||
// PrintGetAttributesUnchecked sends an unchecked request.
|
// PrintGetAttributesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetAttributesUnchecked(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie {
|
func PrintGetAttributesUnchecked(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -769,7 +802,7 @@ type PrintGetAttributesReply struct {
|
||||||
// padding: 1 bytes
|
// padding: 1 bytes
|
||||||
StringLen uint32
|
StringLen uint32
|
||||||
// padding: 20 bytes
|
// padding: 20 bytes
|
||||||
Attributes String8
|
Attributes []String8 // size: xgb.Pad((int(StringLen) * 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reply blocks and returns the reply data for a PrintGetAttributes request.
|
// Reply blocks and returns the reply data for a PrintGetAttributes request.
|
||||||
|
@ -802,8 +835,11 @@ func printGetAttributesReply(buf []byte) *PrintGetAttributesReply {
|
||||||
|
|
||||||
b += 20 // padding
|
b += 20 // padding
|
||||||
|
|
||||||
v.Attributes = String8(buf[b])
|
v.Attributes = make([]String8, v.StringLen)
|
||||||
b += 1
|
for i := 0; i < int(v.StringLen); i++ {
|
||||||
|
v.Attributes[i] = String8(buf[b])
|
||||||
|
b += 1
|
||||||
|
}
|
||||||
|
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
@ -815,7 +851,9 @@ func printGetAttributesRequest(c *xgb.Conn, Context Pcontext, Pool byte) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 17 // request opcode
|
buf[b] = 17 // request opcode
|
||||||
|
@ -843,6 +881,8 @@ type PrintGetContextCookie struct {
|
||||||
// PrintGetContext sends a checked request.
|
// PrintGetContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetContextCookie.Reply()
|
||||||
func PrintGetContext(c *xgb.Conn) PrintGetContextCookie {
|
func PrintGetContext(c *xgb.Conn) PrintGetContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -854,6 +894,8 @@ func PrintGetContext(c *xgb.Conn) PrintGetContextCookie {
|
||||||
// PrintGetContextUnchecked sends an unchecked request.
|
// PrintGetContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetContextUnchecked(c *xgb.Conn) PrintGetContextCookie {
|
func PrintGetContextUnchecked(c *xgb.Conn) PrintGetContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -908,7 +950,9 @@ func printGetContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -928,6 +972,8 @@ type PrintGetDocumentDataCookie struct {
|
||||||
// PrintGetDocumentData sends a checked request.
|
// PrintGetDocumentData sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetDocumentDataCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetDocumentDataCookie.Reply()
|
||||||
func PrintGetDocumentData(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie {
|
func PrintGetDocumentData(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -939,6 +985,8 @@ func PrintGetDocumentData(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintG
|
||||||
// PrintGetDocumentDataUnchecked sends an unchecked request.
|
// PrintGetDocumentDataUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetDocumentDataUnchecked(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie {
|
func PrintGetDocumentDataUnchecked(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1009,7 +1057,9 @@ func printGetDocumentDataRequest(c *xgb.Conn, Context Pcontext, MaxBytes uint32)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 12 // request opcode
|
buf[b] = 12 // request opcode
|
||||||
|
@ -1035,6 +1085,8 @@ type PrintGetImageResolutionCookie struct {
|
||||||
// PrintGetImageResolution sends a checked request.
|
// PrintGetImageResolution sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetImageResolutionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetImageResolutionCookie.Reply()
|
||||||
func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
|
func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1046,6 +1098,8 @@ func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolut
|
||||||
// PrintGetImageResolutionUnchecked sends an unchecked request.
|
// PrintGetImageResolutionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
|
func PrintGetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1100,7 +1154,9 @@ func printGetImageResolutionRequest(c *xgb.Conn, Context Pcontext) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 24 // request opcode
|
buf[b] = 24 // request opcode
|
||||||
|
@ -1123,6 +1179,8 @@ type PrintGetOneAttributesCookie struct {
|
||||||
// PrintGetOneAttributes sends a checked request.
|
// PrintGetOneAttributes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetOneAttributesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetOneAttributesCookie.Reply()
|
||||||
func PrintGetOneAttributes(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie {
|
func PrintGetOneAttributes(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetOneAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetOneAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1134,6 +1192,8 @@ func PrintGetOneAttributes(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool b
|
||||||
// PrintGetOneAttributesUnchecked sends an unchecked request.
|
// PrintGetOneAttributesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetOneAttributesUnchecked(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie {
|
func PrintGetOneAttributesUnchecked(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetOneAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetOneAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1198,7 +1258,9 @@ func printGetOneAttributesRequest(c *xgb.Conn, Context Pcontext, NameLen uint32,
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 19 // request opcode
|
buf[b] = 19 // request opcode
|
||||||
|
@ -1234,6 +1296,8 @@ type PrintGetPageDimensionsCookie struct {
|
||||||
// PrintGetPageDimensions sends a checked request.
|
// PrintGetPageDimensions sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetPageDimensionsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetPageDimensionsCookie.Reply()
|
||||||
func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
|
func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetPageDimensions' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetPageDimensions' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1245,6 +1309,8 @@ func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimension
|
||||||
// PrintGetPageDimensionsUnchecked sends an unchecked request.
|
// PrintGetPageDimensionsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetPageDimensionsUnchecked(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
|
func PrintGetPageDimensionsUnchecked(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetPageDimensions' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetPageDimensions' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1319,7 +1385,9 @@ func printGetPageDimensionsRequest(c *xgb.Conn, Context Pcontext) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 21 // request opcode
|
buf[b] = 21 // request opcode
|
||||||
|
@ -1342,6 +1410,8 @@ type PrintGetPrinterListCookie struct {
|
||||||
// PrintGetPrinterList sends a checked request.
|
// PrintGetPrinterList sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetPrinterListCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetPrinterListCookie.Reply()
|
||||||
func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie {
|
func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1353,6 +1423,8 @@ func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, P
|
||||||
// PrintGetPrinterListUnchecked sends an unchecked request.
|
// PrintGetPrinterListUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetPrinterListUnchecked(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie {
|
func PrintGetPrinterListUnchecked(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1414,7 +1486,9 @@ func printGetPrinterListRequest(c *xgb.Conn, PrinterNameLen uint32, LocaleLen ui
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -1450,6 +1524,8 @@ type PrintGetScreenOfContextCookie struct {
|
||||||
// PrintGetScreenOfContext sends a checked request.
|
// PrintGetScreenOfContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintGetScreenOfContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintGetScreenOfContextCookie.Reply()
|
||||||
func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie {
|
func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetScreenOfContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetScreenOfContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1461,6 +1537,8 @@ func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie {
|
||||||
// PrintGetScreenOfContextUnchecked sends an unchecked request.
|
// PrintGetScreenOfContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintGetScreenOfContextUnchecked(c *xgb.Conn) PrintGetScreenOfContextCookie {
|
func PrintGetScreenOfContextUnchecked(c *xgb.Conn) PrintGetScreenOfContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintGetScreenOfContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintGetScreenOfContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1515,7 +1593,9 @@ func printGetScreenOfContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -1535,6 +1615,8 @@ type PrintInputSelectedCookie struct {
|
||||||
// PrintInputSelected sends a checked request.
|
// PrintInputSelected sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintInputSelectedCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintInputSelectedCookie.Reply()
|
||||||
func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
|
func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintInputSelected' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintInputSelected' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1546,6 +1628,8 @@ func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie
|
||||||
// PrintInputSelectedUnchecked sends an unchecked request.
|
// PrintInputSelectedUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintInputSelectedUnchecked(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
|
func PrintInputSelectedUnchecked(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintInputSelected' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintInputSelected' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1620,7 +1704,9 @@ func printInputSelectedRequest(c *xgb.Conn, Context Pcontext) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 16 // request opcode
|
buf[b] = 16 // request opcode
|
||||||
|
@ -1643,6 +1729,8 @@ type PrintPutDocumentDataCookie struct {
|
||||||
// PrintPutDocumentData sends an unchecked request.
|
// PrintPutDocumentData sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie {
|
func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintPutDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintPutDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1654,6 +1742,8 @@ func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32,
|
||||||
// PrintPutDocumentDataChecked sends a checked request.
|
// PrintPutDocumentDataChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintPutDocumentDataCookie.Check()
|
// If an error occurs, it can be retrieved using PrintPutDocumentDataCookie.Check()
|
||||||
func PrintPutDocumentDataChecked(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie {
|
func PrintPutDocumentDataChecked(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintPutDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintPutDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1675,7 +1765,9 @@ func printPutDocumentDataRequest(c *xgb.Conn, Drawable xproto.Drawable, LenData
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
@ -1720,6 +1812,8 @@ type PrintQueryScreensCookie struct {
|
||||||
// PrintQueryScreens sends a checked request.
|
// PrintQueryScreens sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintQueryScreensCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintQueryScreensCookie.Reply()
|
||||||
func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie {
|
func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintQueryScreens' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintQueryScreens' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1731,6 +1825,8 @@ func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie {
|
||||||
// PrintQueryScreensUnchecked sends an unchecked request.
|
// PrintQueryScreensUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintQueryScreensUnchecked(c *xgb.Conn) PrintQueryScreensCookie {
|
func PrintQueryScreensUnchecked(c *xgb.Conn) PrintQueryScreensCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintQueryScreens' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintQueryScreens' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1795,7 +1891,9 @@ func printQueryScreensRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 22 // request opcode
|
buf[b] = 22 // request opcode
|
||||||
|
@ -1815,6 +1913,8 @@ type PrintQueryVersionCookie struct {
|
||||||
// PrintQueryVersion sends a checked request.
|
// PrintQueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintQueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintQueryVersionCookie.Reply()
|
||||||
func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie {
|
func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintQueryVersion' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintQueryVersion' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1826,6 +1926,8 @@ func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie {
|
||||||
// PrintQueryVersionUnchecked sends an unchecked request.
|
// PrintQueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintQueryVersionUnchecked(c *xgb.Conn) PrintQueryVersionCookie {
|
func PrintQueryVersionUnchecked(c *xgb.Conn) PrintQueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintQueryVersion' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintQueryVersion' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1884,7 +1986,9 @@ func printQueryVersionRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -1904,6 +2008,8 @@ type PrintRehashPrinterListCookie struct {
|
||||||
// PrintRehashPrinterList sends an unchecked request.
|
// PrintRehashPrinterList sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie {
|
func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintRehashPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintRehashPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1915,6 +2021,8 @@ func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie {
|
||||||
// PrintRehashPrinterListChecked sends a checked request.
|
// PrintRehashPrinterListChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintRehashPrinterListCookie.Check()
|
// If an error occurs, it can be retrieved using PrintRehashPrinterListCookie.Check()
|
||||||
func PrintRehashPrinterListChecked(c *xgb.Conn) PrintRehashPrinterListCookie {
|
func PrintRehashPrinterListChecked(c *xgb.Conn) PrintRehashPrinterListCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintRehashPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintRehashPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1936,7 +2044,9 @@ func printRehashPrinterListRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 20 // request opcode
|
buf[b] = 20 // request opcode
|
||||||
|
@ -1956,6 +2066,8 @@ type PrintSelectInputCookie struct {
|
||||||
// PrintSelectInput sends an unchecked request.
|
// PrintSelectInput sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
|
func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSelectInput' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSelectInput' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1967,6 +2079,8 @@ func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList
|
||||||
// PrintSelectInputChecked sends a checked request.
|
// PrintSelectInputChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintSelectInputCookie.Check()
|
// If an error occurs, it can be retrieved using PrintSelectInputCookie.Check()
|
||||||
func PrintSelectInputChecked(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
|
func PrintSelectInputChecked(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSelectInput' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSelectInput' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1988,7 +2102,9 @@ func printSelectInputRequest(c *xgb.Conn, Context Pcontext, EventMask uint32, Ev
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 15 // request opcode
|
buf[b] = 15 // request opcode
|
||||||
|
@ -2019,6 +2135,8 @@ type PrintSetAttributesCookie struct {
|
||||||
// PrintSetAttributes sends an unchecked request.
|
// PrintSetAttributes sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie {
|
func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2030,6 +2148,8 @@ func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool by
|
||||||
// PrintSetAttributesChecked sends a checked request.
|
// PrintSetAttributesChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintSetAttributesCookie.Check()
|
// If an error occurs, it can be retrieved using PrintSetAttributesCookie.Check()
|
||||||
func PrintSetAttributesChecked(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie {
|
func PrintSetAttributesChecked(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2051,7 +2171,9 @@ func printSetAttributesRequest(c *xgb.Conn, Context Pcontext, StringLen uint32,
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 18 // request opcode
|
buf[b] = 18 // request opcode
|
||||||
|
@ -2090,6 +2212,8 @@ type PrintSetContextCookie struct {
|
||||||
// PrintSetContext sends an unchecked request.
|
// PrintSetContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie {
|
func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2101,6 +2225,8 @@ func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie {
|
||||||
// PrintSetContextChecked sends a checked request.
|
// PrintSetContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintSetContextCookie.Check()
|
// If an error occurs, it can be retrieved using PrintSetContextCookie.Check()
|
||||||
func PrintSetContextChecked(c *xgb.Conn, Context uint32) PrintSetContextCookie {
|
func PrintSetContextChecked(c *xgb.Conn, Context uint32) PrintSetContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2122,7 +2248,9 @@ func printSetContextRequest(c *xgb.Conn, Context uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -2145,6 +2273,8 @@ type PrintSetImageResolutionCookie struct {
|
||||||
// PrintSetImageResolution sends a checked request.
|
// PrintSetImageResolution sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling PrintSetImageResolutionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling PrintSetImageResolutionCookie.Reply()
|
||||||
func PrintSetImageResolution(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie {
|
func PrintSetImageResolution(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2156,6 +2286,8 @@ func PrintSetImageResolution(c *xgb.Conn, Context Pcontext, ImageResolution uint
|
||||||
// PrintSetImageResolutionUnchecked sends an unchecked request.
|
// PrintSetImageResolutionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintSetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie {
|
func PrintSetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintSetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintSetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2215,7 +2347,9 @@ func printSetImageResolutionRequest(c *xgb.Conn, Context Pcontext, ImageResoluti
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 23 // request opcode
|
buf[b] = 23 // request opcode
|
||||||
|
@ -2241,6 +2375,8 @@ type PrintStartDocCookie struct {
|
||||||
// PrintStartDoc sends an unchecked request.
|
// PrintStartDoc sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
|
func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintStartDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintStartDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2252,6 +2388,8 @@ func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
|
||||||
// PrintStartDocChecked sends a checked request.
|
// PrintStartDocChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintStartDocCookie.Check()
|
// If an error occurs, it can be retrieved using PrintStartDocCookie.Check()
|
||||||
func PrintStartDocChecked(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
|
func PrintStartDocChecked(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintStartDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintStartDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2273,7 +2411,9 @@ func printStartDocRequest(c *xgb.Conn, DriverMode byte) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 9 // request opcode
|
buf[b] = 9 // request opcode
|
||||||
|
@ -2296,6 +2436,8 @@ type PrintStartJobCookie struct {
|
||||||
// PrintStartJob sends an unchecked request.
|
// PrintStartJob sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
|
func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintStartJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintStartJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2307,6 +2449,8 @@ func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
|
||||||
// PrintStartJobChecked sends a checked request.
|
// PrintStartJobChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintStartJobCookie.Check()
|
// If an error occurs, it can be retrieved using PrintStartJobCookie.Check()
|
||||||
func PrintStartJobChecked(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
|
func PrintStartJobChecked(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintStartJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintStartJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2328,7 +2472,9 @@ func printStartJobRequest(c *xgb.Conn, OutputMode byte) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -2351,6 +2497,8 @@ type PrintStartPageCookie struct {
|
||||||
// PrintStartPage sends an unchecked request.
|
// PrintStartPage sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
|
func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintStartPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintStartPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2362,6 +2510,8 @@ func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
|
||||||
// PrintStartPageChecked sends a checked request.
|
// PrintStartPageChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PrintStartPageCookie.Check()
|
// If an error occurs, it can be retrieved using PrintStartPageCookie.Check()
|
||||||
func PrintStartPageChecked(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
|
func PrintStartPageChecked(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XpExtension"]; !ok {
|
if _, ok := c.Extensions["XpExtension"]; !ok {
|
||||||
panic("Cannot issue request 'PrintStartPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PrintStartPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2383,7 +2533,9 @@ func printStartPageRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XpExtension"]
|
buf[b] = c.Extensions["XpExtension"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 13 // request opcode
|
buf[b] = 13 // request opcode
|
||||||
|
|
|
@ -4227,6 +4227,10 @@ func NewPixmapId(c *xgb.Conn) (Pixmap, error) {
|
||||||
return Pixmap(id), nil
|
return Pixmap(id), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
PixmapNone = 0
|
||||||
|
)
|
||||||
|
|
||||||
// BadPixmap is the error number for a BadPixmap.
|
// BadPixmap is the error number for a BadPixmap.
|
||||||
const BadPixmap = 4
|
const BadPixmap = 4
|
||||||
|
|
||||||
|
@ -4265,10 +4269,6 @@ func init() {
|
||||||
xgb.NewErrorFuncs[4] = PixmapErrorNew
|
xgb.NewErrorFuncs[4] = PixmapErrorNew
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
|
||||||
PixmapNone = 0
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PlaceOnTop = 0
|
PlaceOnTop = 0
|
||||||
PlaceOnBottom = 1
|
PlaceOnBottom = 1
|
||||||
|
@ -6379,10 +6379,6 @@ func NewWindowId(c *xgb.Conn) (Window, error) {
|
||||||
return Window(id), nil
|
return Window(id), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
|
||||||
WindowNone = 0
|
|
||||||
)
|
|
||||||
|
|
||||||
// BadWindow is the error number for a BadWindow.
|
// BadWindow is the error number for a BadWindow.
|
||||||
const BadWindow = 3
|
const BadWindow = 3
|
||||||
|
|
||||||
|
@ -6421,6 +6417,10 @@ func init() {
|
||||||
xgb.NewErrorFuncs[3] = WindowErrorNew
|
xgb.NewErrorFuncs[3] = WindowErrorNew
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
WindowNone = 0
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
WindowClassCopyFromParent = 0
|
WindowClassCopyFromParent = 0
|
||||||
WindowClassInputOutput = 1
|
WindowClassInputOutput = 1
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named SELinux could be found on on the server.")
|
return xgb.Errorf("No extension named SELinux could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["SELinux"] = reply.MajorOpcode
|
c.Extensions["SELinux"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["SELinux"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["SELinux"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["SELinux"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["SELinux"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,6 +160,8 @@ type GetClientContextCookie struct {
|
||||||
// GetClientContext sends a checked request.
|
// GetClientContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetClientContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetClientContextCookie.Reply()
|
||||||
func GetClientContext(c *xgb.Conn, Resource uint32) GetClientContextCookie {
|
func GetClientContext(c *xgb.Conn, Resource uint32) GetClientContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetClientContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetClientContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -172,6 +173,8 @@ func GetClientContext(c *xgb.Conn, Resource uint32) GetClientContextCookie {
|
||||||
// GetClientContextUnchecked sends an unchecked request.
|
// GetClientContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetClientContextUnchecked(c *xgb.Conn, Resource uint32) GetClientContextCookie {
|
func GetClientContextUnchecked(c *xgb.Conn, Resource uint32) GetClientContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetClientContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetClientContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -237,7 +240,9 @@ func getClientContextRequest(c *xgb.Conn, Resource uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 22 // request opcode
|
buf[b] = 22 // request opcode
|
||||||
|
@ -260,6 +265,8 @@ type GetDeviceContextCookie struct {
|
||||||
// GetDeviceContext sends a checked request.
|
// GetDeviceContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetDeviceContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetDeviceContextCookie.Reply()
|
||||||
func GetDeviceContext(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
|
func GetDeviceContext(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -271,6 +278,8 @@ func GetDeviceContext(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
|
||||||
// GetDeviceContextUnchecked sends an unchecked request.
|
// GetDeviceContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetDeviceContextUnchecked(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
|
func GetDeviceContextUnchecked(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -336,7 +345,9 @@ func getDeviceContextRequest(c *xgb.Conn, Device uint32) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -359,6 +370,8 @@ type GetDeviceCreateContextCookie struct {
|
||||||
// GetDeviceCreateContext sends a checked request.
|
// GetDeviceCreateContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetDeviceCreateContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetDeviceCreateContextCookie.Reply()
|
||||||
func GetDeviceCreateContext(c *xgb.Conn) GetDeviceCreateContextCookie {
|
func GetDeviceCreateContext(c *xgb.Conn) GetDeviceCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -370,6 +383,8 @@ func GetDeviceCreateContext(c *xgb.Conn) GetDeviceCreateContextCookie {
|
||||||
// GetDeviceCreateContextUnchecked sends an unchecked request.
|
// GetDeviceCreateContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetDeviceCreateContextUnchecked(c *xgb.Conn) GetDeviceCreateContextCookie {
|
func GetDeviceCreateContextUnchecked(c *xgb.Conn) GetDeviceCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -435,7 +450,9 @@ func getDeviceCreateContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -455,6 +472,8 @@ type GetPropertyContextCookie struct {
|
||||||
// GetPropertyContext sends a checked request.
|
// GetPropertyContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetPropertyContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetPropertyContextCookie.Reply()
|
||||||
func GetPropertyContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie {
|
func GetPropertyContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -466,6 +485,8 @@ func GetPropertyContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom)
|
||||||
// GetPropertyContextUnchecked sends an unchecked request.
|
// GetPropertyContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetPropertyContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie {
|
func GetPropertyContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -531,7 +552,9 @@ func getPropertyContextRequest(c *xgb.Conn, Window xproto.Window, Property xprot
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 12 // request opcode
|
buf[b] = 12 // request opcode
|
||||||
|
@ -557,6 +580,8 @@ type GetPropertyCreateContextCookie struct {
|
||||||
// GetPropertyCreateContext sends a checked request.
|
// GetPropertyCreateContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetPropertyCreateContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetPropertyCreateContextCookie.Reply()
|
||||||
func GetPropertyCreateContext(c *xgb.Conn) GetPropertyCreateContextCookie {
|
func GetPropertyCreateContext(c *xgb.Conn) GetPropertyCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -568,6 +593,8 @@ func GetPropertyCreateContext(c *xgb.Conn) GetPropertyCreateContextCookie {
|
||||||
// GetPropertyCreateContextUnchecked sends an unchecked request.
|
// GetPropertyCreateContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetPropertyCreateContextUnchecked(c *xgb.Conn) GetPropertyCreateContextCookie {
|
func GetPropertyCreateContextUnchecked(c *xgb.Conn) GetPropertyCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -633,7 +660,9 @@ func getPropertyCreateContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 9 // request opcode
|
buf[b] = 9 // request opcode
|
||||||
|
@ -653,6 +682,8 @@ type GetPropertyDataContextCookie struct {
|
||||||
// GetPropertyDataContext sends a checked request.
|
// GetPropertyDataContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetPropertyDataContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetPropertyDataContextCookie.Reply()
|
||||||
func GetPropertyDataContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie {
|
func GetPropertyDataContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -664,6 +695,8 @@ func GetPropertyDataContext(c *xgb.Conn, Window xproto.Window, Property xproto.A
|
||||||
// GetPropertyDataContextUnchecked sends an unchecked request.
|
// GetPropertyDataContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetPropertyDataContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie {
|
func GetPropertyDataContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -729,7 +762,9 @@ func getPropertyDataContextRequest(c *xgb.Conn, Window xproto.Window, Property x
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 13 // request opcode
|
buf[b] = 13 // request opcode
|
||||||
|
@ -755,6 +790,8 @@ type GetPropertyUseContextCookie struct {
|
||||||
// GetPropertyUseContext sends a checked request.
|
// GetPropertyUseContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetPropertyUseContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetPropertyUseContextCookie.Reply()
|
||||||
func GetPropertyUseContext(c *xgb.Conn) GetPropertyUseContextCookie {
|
func GetPropertyUseContext(c *xgb.Conn) GetPropertyUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -766,6 +803,8 @@ func GetPropertyUseContext(c *xgb.Conn) GetPropertyUseContextCookie {
|
||||||
// GetPropertyUseContextUnchecked sends an unchecked request.
|
// GetPropertyUseContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetPropertyUseContextUnchecked(c *xgb.Conn) GetPropertyUseContextCookie {
|
func GetPropertyUseContextUnchecked(c *xgb.Conn) GetPropertyUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -831,7 +870,9 @@ func getPropertyUseContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
@ -851,6 +892,8 @@ type GetSelectionContextCookie struct {
|
||||||
// GetSelectionContext sends a checked request.
|
// GetSelectionContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetSelectionContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetSelectionContextCookie.Reply()
|
||||||
func GetSelectionContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
|
func GetSelectionContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -862,6 +905,8 @@ func GetSelectionContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionContext
|
||||||
// GetSelectionContextUnchecked sends an unchecked request.
|
// GetSelectionContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetSelectionContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
|
func GetSelectionContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -927,7 +972,9 @@ func getSelectionContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 19 // request opcode
|
buf[b] = 19 // request opcode
|
||||||
|
@ -950,6 +997,8 @@ type GetSelectionCreateContextCookie struct {
|
||||||
// GetSelectionCreateContext sends a checked request.
|
// GetSelectionCreateContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetSelectionCreateContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetSelectionCreateContextCookie.Reply()
|
||||||
func GetSelectionCreateContext(c *xgb.Conn) GetSelectionCreateContextCookie {
|
func GetSelectionCreateContext(c *xgb.Conn) GetSelectionCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -961,6 +1010,8 @@ func GetSelectionCreateContext(c *xgb.Conn) GetSelectionCreateContextCookie {
|
||||||
// GetSelectionCreateContextUnchecked sends an unchecked request.
|
// GetSelectionCreateContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetSelectionCreateContextUnchecked(c *xgb.Conn) GetSelectionCreateContextCookie {
|
func GetSelectionCreateContextUnchecked(c *xgb.Conn) GetSelectionCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1026,7 +1077,9 @@ func getSelectionCreateContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 16 // request opcode
|
buf[b] = 16 // request opcode
|
||||||
|
@ -1046,6 +1099,8 @@ type GetSelectionDataContextCookie struct {
|
||||||
// GetSelectionDataContext sends a checked request.
|
// GetSelectionDataContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetSelectionDataContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetSelectionDataContextCookie.Reply()
|
||||||
func GetSelectionDataContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
|
func GetSelectionDataContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1057,6 +1112,8 @@ func GetSelectionDataContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionDat
|
||||||
// GetSelectionDataContextUnchecked sends an unchecked request.
|
// GetSelectionDataContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetSelectionDataContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
|
func GetSelectionDataContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1122,7 +1179,9 @@ func getSelectionDataContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 20 // request opcode
|
buf[b] = 20 // request opcode
|
||||||
|
@ -1145,6 +1204,8 @@ type GetSelectionUseContextCookie struct {
|
||||||
// GetSelectionUseContext sends a checked request.
|
// GetSelectionUseContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetSelectionUseContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetSelectionUseContextCookie.Reply()
|
||||||
func GetSelectionUseContext(c *xgb.Conn) GetSelectionUseContextCookie {
|
func GetSelectionUseContext(c *xgb.Conn) GetSelectionUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1156,6 +1217,8 @@ func GetSelectionUseContext(c *xgb.Conn) GetSelectionUseContextCookie {
|
||||||
// GetSelectionUseContextUnchecked sends an unchecked request.
|
// GetSelectionUseContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetSelectionUseContextUnchecked(c *xgb.Conn) GetSelectionUseContextCookie {
|
func GetSelectionUseContextUnchecked(c *xgb.Conn) GetSelectionUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1221,7 +1284,9 @@ func getSelectionUseContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 18 // request opcode
|
buf[b] = 18 // request opcode
|
||||||
|
@ -1241,6 +1306,8 @@ type GetWindowContextCookie struct {
|
||||||
// GetWindowContext sends a checked request.
|
// GetWindowContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetWindowContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetWindowContextCookie.Reply()
|
||||||
func GetWindowContext(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
|
func GetWindowContext(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetWindowContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetWindowContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1252,6 +1319,8 @@ func GetWindowContext(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie
|
||||||
// GetWindowContextUnchecked sends an unchecked request.
|
// GetWindowContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetWindowContextUnchecked(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
|
func GetWindowContextUnchecked(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetWindowContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetWindowContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1317,7 +1386,9 @@ func getWindowContextRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -1340,6 +1411,8 @@ type GetWindowCreateContextCookie struct {
|
||||||
// GetWindowCreateContext sends a checked request.
|
// GetWindowCreateContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetWindowCreateContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetWindowCreateContextCookie.Reply()
|
||||||
func GetWindowCreateContext(c *xgb.Conn) GetWindowCreateContextCookie {
|
func GetWindowCreateContext(c *xgb.Conn) GetWindowCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1351,6 +1424,8 @@ func GetWindowCreateContext(c *xgb.Conn) GetWindowCreateContextCookie {
|
||||||
// GetWindowCreateContextUnchecked sends an unchecked request.
|
// GetWindowCreateContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetWindowCreateContextUnchecked(c *xgb.Conn) GetWindowCreateContextCookie {
|
func GetWindowCreateContextUnchecked(c *xgb.Conn) GetWindowCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'GetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1416,7 +1491,9 @@ func getWindowCreateContextRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -1436,6 +1513,8 @@ type ListPropertiesCookie struct {
|
||||||
// ListProperties sends a checked request.
|
// ListProperties sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply()
|
||||||
func ListProperties(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
|
func ListProperties(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'ListProperties' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListProperties' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1447,6 +1526,8 @@ func ListProperties(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
|
||||||
// ListPropertiesUnchecked sends an unchecked request.
|
// ListPropertiesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ListPropertiesUnchecked(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
|
func ListPropertiesUnchecked(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'ListProperties' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListProperties' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1508,7 +1589,9 @@ func listPropertiesRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 14 // request opcode
|
buf[b] = 14 // request opcode
|
||||||
|
@ -1531,6 +1614,8 @@ type ListSelectionsCookie struct {
|
||||||
// ListSelections sends a checked request.
|
// ListSelections sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling ListSelectionsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling ListSelectionsCookie.Reply()
|
||||||
func ListSelections(c *xgb.Conn) ListSelectionsCookie {
|
func ListSelections(c *xgb.Conn) ListSelectionsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'ListSelections' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListSelections' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1542,6 +1627,8 @@ func ListSelections(c *xgb.Conn) ListSelectionsCookie {
|
||||||
// ListSelectionsUnchecked sends an unchecked request.
|
// ListSelectionsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ListSelectionsUnchecked(c *xgb.Conn) ListSelectionsCookie {
|
func ListSelectionsUnchecked(c *xgb.Conn) ListSelectionsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'ListSelections' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListSelections' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1603,7 +1690,9 @@ func listSelectionsRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 21 // request opcode
|
buf[b] = 21 // request opcode
|
||||||
|
@ -1623,6 +1712,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1634,6 +1725,8 @@ func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionC
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1692,7 +1785,9 @@ func queryVersionRequest(c *xgb.Conn, ClientMajor byte, ClientMinor byte) []byte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -1718,6 +1813,8 @@ type SetDeviceContextCookie struct {
|
||||||
// SetDeviceContext sends an unchecked request.
|
// SetDeviceContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetDeviceContext(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie {
|
func SetDeviceContext(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1729,6 +1826,8 @@ func SetDeviceContext(c *xgb.Conn, Device uint32, ContextLen uint32, Context str
|
||||||
// SetDeviceContextChecked sends a checked request.
|
// SetDeviceContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetDeviceContextCookie.Check()
|
// If an error occurs, it can be retrieved using SetDeviceContextCookie.Check()
|
||||||
func SetDeviceContextChecked(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie {
|
func SetDeviceContextChecked(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1750,7 +1849,9 @@ func setDeviceContextRequest(c *xgb.Conn, Device uint32, ContextLen uint32, Cont
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -1779,6 +1880,8 @@ type SetDeviceCreateContextCookie struct {
|
||||||
// SetDeviceCreateContext sends an unchecked request.
|
// SetDeviceCreateContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetDeviceCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
|
func SetDeviceCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1790,6 +1893,8 @@ func SetDeviceCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetD
|
||||||
// SetDeviceCreateContextChecked sends a checked request.
|
// SetDeviceCreateContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetDeviceCreateContextCookie.Check()
|
// If an error occurs, it can be retrieved using SetDeviceCreateContextCookie.Check()
|
||||||
func SetDeviceCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
|
func SetDeviceCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1811,7 +1916,9 @@ func setDeviceCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context strin
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -1837,6 +1944,8 @@ type SetPropertyCreateContextCookie struct {
|
||||||
// SetPropertyCreateContext sends an unchecked request.
|
// SetPropertyCreateContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetPropertyCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
|
func SetPropertyCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1848,6 +1957,8 @@ func SetPropertyCreateContext(c *xgb.Conn, ContextLen uint32, Context string) Se
|
||||||
// SetPropertyCreateContextChecked sends a checked request.
|
// SetPropertyCreateContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetPropertyCreateContextCookie.Check()
|
// If an error occurs, it can be retrieved using SetPropertyCreateContextCookie.Check()
|
||||||
func SetPropertyCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
|
func SetPropertyCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1869,7 +1980,9 @@ func setPropertyCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context str
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -1895,6 +2008,8 @@ type SetPropertyUseContextCookie struct {
|
||||||
// SetPropertyUseContext sends an unchecked request.
|
// SetPropertyUseContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetPropertyUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
|
func SetPropertyUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1906,6 +2021,8 @@ func SetPropertyUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetPr
|
||||||
// SetPropertyUseContextChecked sends a checked request.
|
// SetPropertyUseContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetPropertyUseContextCookie.Check()
|
// If an error occurs, it can be retrieved using SetPropertyUseContextCookie.Check()
|
||||||
func SetPropertyUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
|
func SetPropertyUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1927,7 +2044,9 @@ func setPropertyUseContextRequest(c *xgb.Conn, ContextLen uint32, Context string
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -1953,6 +2072,8 @@ type SetSelectionCreateContextCookie struct {
|
||||||
// SetSelectionCreateContext sends an unchecked request.
|
// SetSelectionCreateContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetSelectionCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
|
func SetSelectionCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1964,6 +2085,8 @@ func SetSelectionCreateContext(c *xgb.Conn, ContextLen uint32, Context string) S
|
||||||
// SetSelectionCreateContextChecked sends a checked request.
|
// SetSelectionCreateContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetSelectionCreateContextCookie.Check()
|
// If an error occurs, it can be retrieved using SetSelectionCreateContextCookie.Check()
|
||||||
func SetSelectionCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
|
func SetSelectionCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1985,7 +2108,9 @@ func setSelectionCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context st
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 15 // request opcode
|
buf[b] = 15 // request opcode
|
||||||
|
@ -2011,6 +2136,8 @@ type SetSelectionUseContextCookie struct {
|
||||||
// SetSelectionUseContext sends an unchecked request.
|
// SetSelectionUseContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetSelectionUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
|
func SetSelectionUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2022,6 +2149,8 @@ func SetSelectionUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetS
|
||||||
// SetSelectionUseContextChecked sends a checked request.
|
// SetSelectionUseContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetSelectionUseContextCookie.Check()
|
// If an error occurs, it can be retrieved using SetSelectionUseContextCookie.Check()
|
||||||
func SetSelectionUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
|
func SetSelectionUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2043,7 +2172,9 @@ func setSelectionUseContextRequest(c *xgb.Conn, ContextLen uint32, Context strin
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 17 // request opcode
|
buf[b] = 17 // request opcode
|
||||||
|
@ -2069,6 +2200,8 @@ type SetWindowCreateContextCookie struct {
|
||||||
// SetWindowCreateContext sends an unchecked request.
|
// SetWindowCreateContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetWindowCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
|
func SetWindowCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2080,6 +2213,8 @@ func SetWindowCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetW
|
||||||
// SetWindowCreateContextChecked sends a checked request.
|
// SetWindowCreateContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetWindowCreateContextCookie.Check()
|
// If an error occurs, it can be retrieved using SetWindowCreateContextCookie.Check()
|
||||||
func SetWindowCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
|
func SetWindowCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["SELinux"]; !ok {
|
if _, ok := c.Extensions["SELinux"]; !ok {
|
||||||
panic("Cannot issue request 'SetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2101,7 +2236,9 @@ func setWindowCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context strin
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["SELinux"]
|
buf[b] = c.Extensions["SELinux"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
|
|
@ -19,16 +19,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XTEST could be found on on the server.")
|
return xgb.Errorf("No extension named XTEST could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XTEST"] = reply.MajorOpcode
|
c.Extensions["XTEST"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XTEST"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XTEST"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XTEST"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XTEST"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +73,8 @@ type CompareCursorCookie struct {
|
||||||
// CompareCursor sends a checked request.
|
// CompareCursor sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CompareCursorCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CompareCursorCookie.Reply()
|
||||||
func CompareCursor(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie {
|
func CompareCursor(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'CompareCursor' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompareCursor' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -85,6 +86,8 @@ func CompareCursor(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) Comp
|
||||||
// CompareCursorUnchecked sends an unchecked request.
|
// CompareCursorUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CompareCursorUnchecked(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie {
|
func CompareCursorUnchecked(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'CompareCursor' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CompareCursor' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -140,7 +143,9 @@ func compareCursorRequest(c *xgb.Conn, Window xproto.Window, Cursor xproto.Curso
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XTEST"]
|
buf[b] = c.Extensions["XTEST"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -166,6 +171,8 @@ type FakeInputCookie struct {
|
||||||
// FakeInput sends an unchecked request.
|
// FakeInput sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func FakeInput(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie {
|
func FakeInput(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'FakeInput' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FakeInput' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -177,6 +184,8 @@ func FakeInput(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Win
|
||||||
// FakeInputChecked sends a checked request.
|
// FakeInputChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using FakeInputCookie.Check()
|
// If an error occurs, it can be retrieved using FakeInputCookie.Check()
|
||||||
func FakeInputChecked(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie {
|
func FakeInputChecked(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'FakeInput' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'FakeInput' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -198,7 +207,9 @@ func fakeInputRequest(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xpr
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XTEST"]
|
buf[b] = c.Extensions["XTEST"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -245,6 +256,8 @@ type GetVersionCookie struct {
|
||||||
// GetVersion sends a checked request.
|
// GetVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
|
||||||
func GetVersion(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie {
|
func GetVersion(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -256,6 +269,8 @@ func GetVersion(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionC
|
||||||
// GetVersionUnchecked sends an unchecked request.
|
// GetVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetVersionUnchecked(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie {
|
func GetVersionUnchecked(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVersion' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -311,7 +326,9 @@ func getVersionRequest(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) []by
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XTEST"]
|
buf[b] = c.Extensions["XTEST"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -339,6 +356,8 @@ type GrabControlCookie struct {
|
||||||
// GrabControl sends an unchecked request.
|
// GrabControl sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GrabControl(c *xgb.Conn, Impervious bool) GrabControlCookie {
|
func GrabControl(c *xgb.Conn, Impervious bool) GrabControlCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'GrabControl' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GrabControl' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -350,6 +369,8 @@ func GrabControl(c *xgb.Conn, Impervious bool) GrabControlCookie {
|
||||||
// GrabControlChecked sends a checked request.
|
// GrabControlChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using GrabControlCookie.Check()
|
// If an error occurs, it can be retrieved using GrabControlCookie.Check()
|
||||||
func GrabControlChecked(c *xgb.Conn, Impervious bool) GrabControlCookie {
|
func GrabControlChecked(c *xgb.Conn, Impervious bool) GrabControlCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XTEST"]; !ok {
|
if _, ok := c.Extensions["XTEST"]; !ok {
|
||||||
panic("Cannot issue request 'GrabControl' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GrabControl' using the uninitialized extension 'XTEST'. xtest.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -371,7 +392,9 @@ func grabControlRequest(c *xgb.Conn, Impervious bool) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XTEST"]
|
buf[b] = c.Extensions["XTEST"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
|
135
nexgb/xv/xv.go
135
nexgb/xv/xv.go
|
@ -20,16 +20,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XVideo could be found on on the server.")
|
return xgb.Errorf("No extension named XVideo could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XVideo"] = reply.MajorOpcode
|
c.Extensions["XVideo"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XVideo"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XVideo"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XVideo"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XVideo"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +45,7 @@ type AdaptorInfo struct {
|
||||||
Type byte
|
Type byte
|
||||||
// padding: 1 bytes
|
// padding: 1 bytes
|
||||||
Name string // size: xgb.Pad((int(NameSize) * 1))
|
Name string // size: xgb.Pad((int(NameSize) * 1))
|
||||||
// alignment gap to multiple of 4
|
// padding: 0 bytes
|
||||||
Formats []Format // size: xgb.Pad((int(NumFormats) * 8))
|
Formats []Format // size: xgb.Pad((int(NumFormats) * 8))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +77,7 @@ func AdaptorInfoRead(buf []byte, v *AdaptorInfo) int {
|
||||||
b += int(v.NameSize)
|
b += int(v.NameSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
b = (b + 3) & ^3 // alignment gap
|
b += 0 // padding
|
||||||
|
|
||||||
v.Formats = make([]Format, v.NumFormats)
|
v.Formats = make([]Format, v.NumFormats)
|
||||||
b += FormatReadList(buf[b:], v.Formats)
|
b += FormatReadList(buf[b:], v.Formats)
|
||||||
|
@ -98,7 +97,7 @@ func AdaptorInfoReadList(buf []byte, dest []AdaptorInfo) int {
|
||||||
|
|
||||||
// Bytes writes a AdaptorInfo value to a byte slice.
|
// Bytes writes a AdaptorInfo value to a byte slice.
|
||||||
func (v AdaptorInfo) Bytes() []byte {
|
func (v AdaptorInfo) Bytes() []byte {
|
||||||
buf := make([]byte, (((12 + xgb.Pad((int(v.NameSize) * 1))) + 4) + xgb.Pad((int(v.NumFormats) * 8))))
|
buf := make([]byte, (((12 + xgb.Pad((int(v.NameSize) * 1))) + 0) + xgb.Pad((int(v.NumFormats) * 8))))
|
||||||
b := 0
|
b := 0
|
||||||
|
|
||||||
xgb.Put32(buf[b:], uint32(v.BaseId))
|
xgb.Put32(buf[b:], uint32(v.BaseId))
|
||||||
|
@ -121,7 +120,7 @@ func (v AdaptorInfo) Bytes() []byte {
|
||||||
copy(buf[b:], v.Name[:v.NameSize])
|
copy(buf[b:], v.Name[:v.NameSize])
|
||||||
b += int(v.NameSize)
|
b += int(v.NameSize)
|
||||||
|
|
||||||
b = (b + 3) & ^3 // alignment gap
|
b += 0 // padding
|
||||||
|
|
||||||
b += FormatListBytes(buf[b:], v.Formats)
|
b += FormatListBytes(buf[b:], v.Formats)
|
||||||
|
|
||||||
|
@ -144,7 +143,7 @@ func AdaptorInfoListBytes(buf []byte, list []AdaptorInfo) int {
|
||||||
func AdaptorInfoListSize(list []AdaptorInfo) int {
|
func AdaptorInfoListSize(list []AdaptorInfo) int {
|
||||||
size := 0
|
size := 0
|
||||||
for _, item := range list {
|
for _, item := range list {
|
||||||
size += (((12 + xgb.Pad((int(item.NameSize) * 1))) + 4) + xgb.Pad((int(item.NumFormats) * 8)))
|
size += (((12 + xgb.Pad((int(item.NameSize) * 1))) + 0) + xgb.Pad((int(item.NumFormats) * 8)))
|
||||||
}
|
}
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
@ -1208,6 +1207,8 @@ type GetPortAttributeCookie struct {
|
||||||
// GetPortAttribute sends a checked request.
|
// GetPortAttribute sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GetPortAttributeCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GetPortAttributeCookie.Reply()
|
||||||
func GetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
|
func GetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1219,6 +1220,8 @@ func GetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttr
|
||||||
// GetPortAttributeUnchecked sends an unchecked request.
|
// GetPortAttributeUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetPortAttributeUnchecked(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
|
func GetPortAttributeUnchecked(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1273,7 +1276,9 @@ func getPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom) []by
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 14 // request opcode
|
buf[b] = 14 // request opcode
|
||||||
|
@ -1299,6 +1304,8 @@ type GetStillCookie struct {
|
||||||
// GetStill sends an unchecked request.
|
// GetStill sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie {
|
func GetStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GetStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1310,6 +1317,8 @@ func GetStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
|
||||||
// GetStillChecked sends a checked request.
|
// GetStillChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using GetStillCookie.Check()
|
// If an error occurs, it can be retrieved using GetStillCookie.Check()
|
||||||
func GetStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie {
|
func GetStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GetStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1331,7 +1340,9 @@ func getStillRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -1384,6 +1395,8 @@ type GetVideoCookie struct {
|
||||||
// GetVideo sends an unchecked request.
|
// GetVideo sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GetVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie {
|
func GetVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GetVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1395,6 +1408,8 @@ func GetVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
|
||||||
// GetVideoChecked sends a checked request.
|
// GetVideoChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using GetVideoCookie.Check()
|
// If an error occurs, it can be retrieved using GetVideoCookie.Check()
|
||||||
func GetVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie {
|
func GetVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GetVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GetVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1416,7 +1431,9 @@ func getVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -1469,6 +1486,8 @@ type GrabPortCookie struct {
|
||||||
// GrabPort sends a checked request.
|
// GrabPort sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling GrabPortCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling GrabPortCookie.Reply()
|
||||||
func GrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
|
func GrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1480,6 +1499,8 @@ func GrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
|
||||||
// GrabPortUnchecked sends an unchecked request.
|
// GrabPortUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func GrabPortUnchecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
|
func GrabPortUnchecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'GrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'GrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1531,7 +1552,9 @@ func grabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -1557,6 +1580,8 @@ type ListImageFormatsCookie struct {
|
||||||
// ListImageFormats sends a checked request.
|
// ListImageFormats sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling ListImageFormatsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling ListImageFormatsCookie.Reply()
|
||||||
func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie {
|
func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'ListImageFormats' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListImageFormats' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1568,6 +1593,8 @@ func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie {
|
||||||
// ListImageFormatsUnchecked sends an unchecked request.
|
// ListImageFormatsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ListImageFormatsUnchecked(c *xgb.Conn, Port Port) ListImageFormatsCookie {
|
func ListImageFormatsUnchecked(c *xgb.Conn, Port Port) ListImageFormatsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'ListImageFormats' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListImageFormats' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1629,7 +1656,9 @@ func listImageFormatsRequest(c *xgb.Conn, Port Port) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 16 // request opcode
|
buf[b] = 16 // request opcode
|
||||||
|
@ -1652,6 +1681,8 @@ type PutImageCookie struct {
|
||||||
// PutImage sends an unchecked request.
|
// PutImage sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie {
|
func PutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'PutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1663,6 +1694,8 @@ func PutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
|
||||||
// PutImageChecked sends a checked request.
|
// PutImageChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PutImageCookie.Check()
|
// If an error occurs, it can be retrieved using PutImageCookie.Check()
|
||||||
func PutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie {
|
func PutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'PutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1684,7 +1717,9 @@ func putImageRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 18 // request opcode
|
buf[b] = 18 // request opcode
|
||||||
|
@ -1749,6 +1784,8 @@ type PutStillCookie struct {
|
||||||
// PutStill sends an unchecked request.
|
// PutStill sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PutStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie {
|
func PutStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'PutStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1760,6 +1797,8 @@ func PutStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
|
||||||
// PutStillChecked sends a checked request.
|
// PutStillChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PutStillCookie.Check()
|
// If an error occurs, it can be retrieved using PutStillCookie.Check()
|
||||||
func PutStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie {
|
func PutStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'PutStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1781,7 +1820,9 @@ func putStillRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -1834,6 +1875,8 @@ type PutVideoCookie struct {
|
||||||
// PutVideo sends an unchecked request.
|
// PutVideo sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func PutVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie {
|
func PutVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'PutVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1845,6 +1888,8 @@ func PutVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
|
||||||
// PutVideoChecked sends a checked request.
|
// PutVideoChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using PutVideoCookie.Check()
|
// If an error occurs, it can be retrieved using PutVideoCookie.Check()
|
||||||
func PutVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie {
|
func PutVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'PutVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'PutVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1866,7 +1911,9 @@ func putVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -1919,6 +1966,8 @@ type QueryAdaptorsCookie struct {
|
||||||
// QueryAdaptors sends a checked request.
|
// QueryAdaptors sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryAdaptorsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryAdaptorsCookie.Reply()
|
||||||
func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
|
func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryAdaptors' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryAdaptors' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1930,6 +1979,8 @@ func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
|
||||||
// QueryAdaptorsUnchecked sends an unchecked request.
|
// QueryAdaptorsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryAdaptorsUnchecked(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
|
func QueryAdaptorsUnchecked(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryAdaptors' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryAdaptors' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -1991,7 +2042,9 @@ func queryAdaptorsRequest(c *xgb.Conn, Window xproto.Window) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -2014,6 +2067,8 @@ type QueryBestSizeCookie struct {
|
||||||
// QueryBestSize sends a checked request.
|
// QueryBestSize sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryBestSizeCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryBestSizeCookie.Reply()
|
||||||
func QueryBestSize(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie {
|
func QueryBestSize(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryBestSize' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryBestSize' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2025,6 +2080,8 @@ func QueryBestSize(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16
|
||||||
// QueryBestSizeUnchecked sends an unchecked request.
|
// QueryBestSizeUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryBestSizeUnchecked(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie {
|
func QueryBestSizeUnchecked(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryBestSize' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryBestSize' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2083,7 +2140,9 @@ func queryBestSizeRequest(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 12 // request opcode
|
buf[b] = 12 // request opcode
|
||||||
|
@ -2127,6 +2186,8 @@ type QueryEncodingsCookie struct {
|
||||||
// QueryEncodings sends a checked request.
|
// QueryEncodings sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryEncodingsCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryEncodingsCookie.Reply()
|
||||||
func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie {
|
func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryEncodings' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryEncodings' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2138,6 +2199,8 @@ func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie {
|
||||||
// QueryEncodingsUnchecked sends an unchecked request.
|
// QueryEncodingsUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryEncodingsUnchecked(c *xgb.Conn, Port Port) QueryEncodingsCookie {
|
func QueryEncodingsUnchecked(c *xgb.Conn, Port Port) QueryEncodingsCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryEncodings' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryEncodings' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2199,7 +2262,9 @@ func queryEncodingsRequest(c *xgb.Conn, Port Port) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -2222,6 +2287,8 @@ type QueryExtensionCookie struct {
|
||||||
// QueryExtension sends a checked request.
|
// QueryExtension sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply()
|
||||||
func QueryExtension(c *xgb.Conn) QueryExtensionCookie {
|
func QueryExtension(c *xgb.Conn) QueryExtensionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryExtension' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryExtension' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2233,6 +2300,8 @@ func QueryExtension(c *xgb.Conn) QueryExtensionCookie {
|
||||||
// QueryExtensionUnchecked sends an unchecked request.
|
// QueryExtensionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryExtensionUnchecked(c *xgb.Conn) QueryExtensionCookie {
|
func QueryExtensionUnchecked(c *xgb.Conn) QueryExtensionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryExtension' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryExtension' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2291,7 +2360,9 @@ func queryExtensionRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
@ -2311,6 +2382,8 @@ type QueryImageAttributesCookie struct {
|
||||||
// QueryImageAttributes sends a checked request.
|
// QueryImageAttributes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryImageAttributesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryImageAttributesCookie.Reply()
|
||||||
func QueryImageAttributes(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie {
|
func QueryImageAttributes(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryImageAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryImageAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2322,6 +2395,8 @@ func QueryImageAttributes(c *xgb.Conn, Port Port, Id uint32, Width uint16, Heigh
|
||||||
// QueryImageAttributesUnchecked sends an unchecked request.
|
// QueryImageAttributesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryImageAttributesUnchecked(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie {
|
func QueryImageAttributesUnchecked(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryImageAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryImageAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2408,7 +2483,9 @@ func queryImageAttributesRequest(c *xgb.Conn, Port Port, Id uint32, Width uint16
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 17 // request opcode
|
buf[b] = 17 // request opcode
|
||||||
|
@ -2440,6 +2517,8 @@ type QueryPortAttributesCookie struct {
|
||||||
// QueryPortAttributes sends a checked request.
|
// QueryPortAttributes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryPortAttributesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryPortAttributesCookie.Reply()
|
||||||
func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
|
func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryPortAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryPortAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2451,6 +2530,8 @@ func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
|
||||||
// QueryPortAttributesUnchecked sends an unchecked request.
|
// QueryPortAttributesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryPortAttributesUnchecked(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
|
func QueryPortAttributesUnchecked(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'QueryPortAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryPortAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2516,7 +2597,9 @@ func queryPortAttributesRequest(c *xgb.Conn, Port Port) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 15 // request opcode
|
buf[b] = 15 // request opcode
|
||||||
|
@ -2539,6 +2622,8 @@ type SelectPortNotifyCookie struct {
|
||||||
// SelectPortNotify sends an unchecked request.
|
// SelectPortNotify sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SelectPortNotify(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
|
func SelectPortNotify(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'SelectPortNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectPortNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2550,6 +2635,8 @@ func SelectPortNotify(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie
|
||||||
// SelectPortNotifyChecked sends a checked request.
|
// SelectPortNotifyChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SelectPortNotifyCookie.Check()
|
// If an error occurs, it can be retrieved using SelectPortNotifyCookie.Check()
|
||||||
func SelectPortNotifyChecked(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
|
func SelectPortNotifyChecked(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'SelectPortNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectPortNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2571,7 +2658,9 @@ func selectPortNotifyRequest(c *xgb.Conn, Port Port, Onoff bool) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 11 // request opcode
|
buf[b] = 11 // request opcode
|
||||||
|
@ -2603,6 +2692,8 @@ type SelectVideoNotifyCookie struct {
|
||||||
// SelectVideoNotify sends an unchecked request.
|
// SelectVideoNotify sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SelectVideoNotify(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
|
func SelectVideoNotify(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'SelectVideoNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectVideoNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2614,6 +2705,8 @@ func SelectVideoNotify(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) Select
|
||||||
// SelectVideoNotifyChecked sends a checked request.
|
// SelectVideoNotifyChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SelectVideoNotifyCookie.Check()
|
// If an error occurs, it can be retrieved using SelectVideoNotifyCookie.Check()
|
||||||
func SelectVideoNotifyChecked(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
|
func SelectVideoNotifyChecked(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'SelectVideoNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SelectVideoNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2635,7 +2728,9 @@ func selectVideoNotifyRequest(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 10 // request opcode
|
buf[b] = 10 // request opcode
|
||||||
|
@ -2667,6 +2762,8 @@ type SetPortAttributeCookie struct {
|
||||||
// SetPortAttribute sends an unchecked request.
|
// SetPortAttribute sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func SetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
|
func SetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'SetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2678,6 +2775,8 @@ func SetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32
|
||||||
// SetPortAttributeChecked sends a checked request.
|
// SetPortAttributeChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using SetPortAttributeCookie.Check()
|
// If an error occurs, it can be retrieved using SetPortAttributeCookie.Check()
|
||||||
func SetPortAttributeChecked(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
|
func SetPortAttributeChecked(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'SetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'SetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2699,7 +2798,9 @@ func setPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom, Valu
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 13 // request opcode
|
buf[b] = 13 // request opcode
|
||||||
|
@ -2728,6 +2829,8 @@ type ShmPutImageCookie struct {
|
||||||
// ShmPutImage sends an unchecked request.
|
// ShmPutImage sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ShmPutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie {
|
func ShmPutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'ShmPutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ShmPutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2739,6 +2842,8 @@ func ShmPutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gco
|
||||||
// ShmPutImageChecked sends a checked request.
|
// ShmPutImageChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using ShmPutImageCookie.Check()
|
// If an error occurs, it can be retrieved using ShmPutImageCookie.Check()
|
||||||
func ShmPutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie {
|
func ShmPutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'ShmPutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ShmPutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2760,7 +2865,9 @@ func shmPutImageRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xpr
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 19 // request opcode
|
buf[b] = 19 // request opcode
|
||||||
|
@ -2833,6 +2940,8 @@ type StopVideoCookie struct {
|
||||||
// StopVideo sends an unchecked request.
|
// StopVideo sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func StopVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
|
func StopVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'StopVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'StopVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2844,6 +2953,8 @@ func StopVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie
|
||||||
// StopVideoChecked sends a checked request.
|
// StopVideoChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using StopVideoCookie.Check()
|
// If an error occurs, it can be retrieved using StopVideoCookie.Check()
|
||||||
func StopVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
|
func StopVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'StopVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'StopVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2865,7 +2976,9 @@ func stopVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 9 // request opcode
|
buf[b] = 9 // request opcode
|
||||||
|
@ -2891,6 +3004,8 @@ type UngrabPortCookie struct {
|
||||||
// UngrabPort sends an unchecked request.
|
// UngrabPort sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func UngrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
|
func UngrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'UngrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UngrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2902,6 +3017,8 @@ func UngrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie
|
||||||
// UngrabPortChecked sends a checked request.
|
// UngrabPortChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using UngrabPortCookie.Check()
|
// If an error occurs, it can be retrieved using UngrabPortCookie.Check()
|
||||||
func UngrabPortChecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
|
func UngrabPortChecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo"]; !ok {
|
if _, ok := c.Extensions["XVideo"]; !ok {
|
||||||
panic("Cannot issue request 'UngrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
panic("Cannot issue request 'UngrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -2923,7 +3040,9 @@ func ungrabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo"]
|
buf[b] = c.Extensions["XVideo"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
|
|
@ -20,16 +20,15 @@ func Init(c *xgb.Conn) error {
|
||||||
return xgb.Errorf("No extension named XVideo-MotionCompensation could be found on on the server.")
|
return xgb.Errorf("No extension named XVideo-MotionCompensation could be found on on the server.")
|
||||||
}
|
}
|
||||||
|
|
||||||
xgb.ExtLock.Lock()
|
c.ExtLock.Lock()
|
||||||
c.Extensions["XVideo-MotionCompensation"] = reply.MajorOpcode
|
c.Extensions["XVideo-MotionCompensation"] = reply.MajorOpcode
|
||||||
|
c.ExtLock.Unlock()
|
||||||
for evNum, fun := range xgb.NewExtEventFuncs["XVideo-MotionCompensation"] {
|
for evNum, fun := range xgb.NewExtEventFuncs["XVideo-MotionCompensation"] {
|
||||||
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
xgb.NewEventFuncs[int(reply.FirstEvent)+evNum] = fun
|
||||||
}
|
}
|
||||||
for errNum, fun := range xgb.NewExtErrorFuncs["XVideo-MotionCompensation"] {
|
for errNum, fun := range xgb.NewExtErrorFuncs["XVideo-MotionCompensation"] {
|
||||||
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
xgb.NewErrorFuncs[int(reply.FirstError)+errNum] = fun
|
||||||
}
|
}
|
||||||
xgb.ExtLock.Unlock()
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,6 +202,8 @@ type CreateContextCookie struct {
|
||||||
// CreateContext sends a checked request.
|
// CreateContext sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply()
|
||||||
func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie {
|
func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -214,6 +215,8 @@ func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Sur
|
||||||
// CreateContextUnchecked sends an unchecked request.
|
// CreateContextUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateContextUnchecked(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie {
|
func CreateContextUnchecked(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -286,7 +289,9 @@ func createContextRequest(c *xgb.Conn, ContextId Context, PortId xv.Port, Surfac
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 2 // request opcode
|
buf[b] = 2 // request opcode
|
||||||
|
@ -324,6 +329,8 @@ type CreateSubpictureCookie struct {
|
||||||
// CreateSubpicture sends a checked request.
|
// CreateSubpicture sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CreateSubpictureCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CreateSubpictureCookie.Reply()
|
||||||
func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie {
|
func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -335,6 +342,8 @@ func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, Xvi
|
||||||
// CreateSubpictureUnchecked sends an unchecked request.
|
// CreateSubpictureUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateSubpictureUnchecked(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie {
|
func CreateSubpictureUnchecked(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -416,7 +425,9 @@ func createSubpictureRequest(c *xgb.Conn, SubpictureId Subpicture, Context Conte
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 6 // request opcode
|
buf[b] = 6 // request opcode
|
||||||
|
@ -451,6 +462,8 @@ type CreateSurfaceCookie struct {
|
||||||
// CreateSurface sends a checked request.
|
// CreateSurface sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling CreateSurfaceCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling CreateSurfaceCookie.Reply()
|
||||||
func CreateSurface(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie {
|
func CreateSurface(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -462,6 +475,8 @@ func CreateSurface(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurf
|
||||||
// CreateSurfaceUnchecked sends an unchecked request.
|
// CreateSurfaceUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func CreateSurfaceUnchecked(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie {
|
func CreateSurfaceUnchecked(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'CreateSurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'CreateSurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -522,7 +537,9 @@ func createSurfaceRequest(c *xgb.Conn, SurfaceId Surface, ContextId Context) []b
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 4 // request opcode
|
buf[b] = 4 // request opcode
|
||||||
|
@ -548,6 +565,8 @@ type DestroyContextCookie struct {
|
||||||
// DestroyContext sends an unchecked request.
|
// DestroyContext sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DestroyContext(c *xgb.Conn, ContextId Context) DestroyContextCookie {
|
func DestroyContext(c *xgb.Conn, ContextId Context) DestroyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -559,6 +578,8 @@ func DestroyContext(c *xgb.Conn, ContextId Context) DestroyContextCookie {
|
||||||
// DestroyContextChecked sends a checked request.
|
// DestroyContextChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroyContextCookie.Check()
|
// If an error occurs, it can be retrieved using DestroyContextCookie.Check()
|
||||||
func DestroyContextChecked(c *xgb.Conn, ContextId Context) DestroyContextCookie {
|
func DestroyContextChecked(c *xgb.Conn, ContextId Context) DestroyContextCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroyContext' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -580,7 +601,9 @@ func destroyContextRequest(c *xgb.Conn, ContextId Context) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 3 // request opcode
|
buf[b] = 3 // request opcode
|
||||||
|
@ -603,6 +626,8 @@ type DestroySubpictureCookie struct {
|
||||||
// DestroySubpicture sends an unchecked request.
|
// DestroySubpicture sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DestroySubpicture(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie {
|
func DestroySubpicture(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'DestroySubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroySubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -614,6 +639,8 @@ func DestroySubpicture(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCo
|
||||||
// DestroySubpictureChecked sends a checked request.
|
// DestroySubpictureChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroySubpictureCookie.Check()
|
// If an error occurs, it can be retrieved using DestroySubpictureCookie.Check()
|
||||||
func DestroySubpictureChecked(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie {
|
func DestroySubpictureChecked(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'DestroySubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroySubpicture' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -635,7 +662,9 @@ func destroySubpictureRequest(c *xgb.Conn, SubpictureId Subpicture) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 7 // request opcode
|
buf[b] = 7 // request opcode
|
||||||
|
@ -658,6 +687,8 @@ type DestroySurfaceCookie struct {
|
||||||
// DestroySurface sends an unchecked request.
|
// DestroySurface sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func DestroySurface(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie {
|
func DestroySurface(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'DestroySurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroySurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -669,6 +700,8 @@ func DestroySurface(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie {
|
||||||
// DestroySurfaceChecked sends a checked request.
|
// DestroySurfaceChecked sends a checked request.
|
||||||
// If an error occurs, it can be retrieved using DestroySurfaceCookie.Check()
|
// If an error occurs, it can be retrieved using DestroySurfaceCookie.Check()
|
||||||
func DestroySurfaceChecked(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie {
|
func DestroySurfaceChecked(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'DestroySurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'DestroySurface' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -690,7 +723,9 @@ func destroySurfaceRequest(c *xgb.Conn, SurfaceId Surface) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 5 // request opcode
|
buf[b] = 5 // request opcode
|
||||||
|
@ -713,6 +748,8 @@ type ListSubpictureTypesCookie struct {
|
||||||
// ListSubpictureTypes sends a checked request.
|
// ListSubpictureTypes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling ListSubpictureTypesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling ListSubpictureTypesCookie.Reply()
|
||||||
func ListSubpictureTypes(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie {
|
func ListSubpictureTypes(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'ListSubpictureTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListSubpictureTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -724,6 +761,8 @@ func ListSubpictureTypes(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSub
|
||||||
// ListSubpictureTypesUnchecked sends an unchecked request.
|
// ListSubpictureTypesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ListSubpictureTypesUnchecked(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie {
|
func ListSubpictureTypesUnchecked(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'ListSubpictureTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListSubpictureTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -785,7 +824,9 @@ func listSubpictureTypesRequest(c *xgb.Conn, PortId xv.Port, SurfaceId Surface)
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 8 // request opcode
|
buf[b] = 8 // request opcode
|
||||||
|
@ -811,6 +852,8 @@ type ListSurfaceTypesCookie struct {
|
||||||
// ListSurfaceTypes sends a checked request.
|
// ListSurfaceTypes sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling ListSurfaceTypesCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling ListSurfaceTypesCookie.Reply()
|
||||||
func ListSurfaceTypes(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie {
|
func ListSurfaceTypes(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'ListSurfaceTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListSurfaceTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -822,6 +865,8 @@ func ListSurfaceTypes(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie {
|
||||||
// ListSurfaceTypesUnchecked sends an unchecked request.
|
// ListSurfaceTypesUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func ListSurfaceTypesUnchecked(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie {
|
func ListSurfaceTypesUnchecked(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'ListSurfaceTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'ListSurfaceTypes' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -883,7 +928,9 @@ func listSurfaceTypesRequest(c *xgb.Conn, PortId xv.Port) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 1 // request opcode
|
buf[b] = 1 // request opcode
|
||||||
|
@ -906,6 +953,8 @@ type QueryVersionCookie struct {
|
||||||
// QueryVersion sends a checked request.
|
// QueryVersion sends a checked request.
|
||||||
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
|
||||||
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -917,6 +966,8 @@ func QueryVersion(c *xgb.Conn) QueryVersionCookie {
|
||||||
// QueryVersionUnchecked sends an unchecked request.
|
// QueryVersionUnchecked sends an unchecked request.
|
||||||
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
|
||||||
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
|
||||||
|
c.ExtLock.RLock()
|
||||||
|
defer c.ExtLock.RUnlock()
|
||||||
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok {
|
||||||
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XVideo-MotionCompensation'. xvmc.Init(connObj) must be called first.")
|
||||||
}
|
}
|
||||||
|
@ -975,7 +1026,9 @@ func queryVersionRequest(c *xgb.Conn) []byte {
|
||||||
b := 0
|
b := 0
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
|
|
||||||
|
c.ExtLock.RLock()
|
||||||
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
buf[b] = c.Extensions["XVideo-MotionCompensation"]
|
||||||
|
c.ExtLock.RUnlock()
|
||||||
b += 1
|
b += 1
|
||||||
|
|
||||||
buf[b] = 0 // request opcode
|
buf[b] = 0 // request opcode
|
||||||
|
|
Loading…
Reference in New Issue