Ejemplo n.º 1
0
// ConnectUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ConnectUnchecked(c *xgb.Conn, buf []byte, Window xproto.Window, DriverType uint32) (ConnectCookie, []byte) {
	if _, ok := c.Extensions["DRI2"]; !ok {
		panic("Cannot issue request 'Connect' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = connectRequest(c, buf, Window, DriverType)
	c.NewRequest(buf, cookie)
	return ConnectCookie{cookie}, buf
}
Ejemplo n.º 2
0
// CreateRegionFromBorderClipChecked sends a checked request.
// If an error occurs, it can be retrieved using CreateRegionFromBorderClipCookie.Check()
func CreateRegionFromBorderClipChecked(c *xgb.Conn, buf []byte, Region xfixes.Region, Window xproto.Window) (CreateRegionFromBorderClipCookie, []byte) {
	if _, ok := c.Extensions["COMPOSITE"]; !ok {
		panic("Cannot issue request 'CreateRegionFromBorderClip' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = createRegionFromBorderClipRequest(c, buf, Region, Window)
	c.NewRequest(buf, cookie)
	return CreateRegionFromBorderClipCookie{cookie}, buf
}
Ejemplo n.º 3
0
// ReleaseOverlayWindowChecked sends a checked request.
// If an error occurs, it can be retrieved using ReleaseOverlayWindowCookie.Check()
func ReleaseOverlayWindowChecked(c *xgb.Conn, buf []byte, Window xproto.Window) (ReleaseOverlayWindowCookie, []byte) {
	if _, ok := c.Extensions["COMPOSITE"]; !ok {
		panic("Cannot issue request 'ReleaseOverlayWindow' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = releaseOverlayWindowRequest(c, buf, Window)
	c.NewRequest(buf, cookie)
	return ReleaseOverlayWindowCookie{cookie}, buf
}
Ejemplo n.º 4
0
// PutImageChecked sends a checked request.
// If an error occurs, it can be retrieved using PutImageCookie.Check()
func PutImageChecked(c *xgb.Conn, buf []byte, 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, []byte) {
	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.")
	}
	cookie := c.NewCookie(true, false)
	buf = putImageRequest(c, buf, Drawable, Gc, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY, Depth, Format, SendEvent, Shmseg, Offset)
	c.NewRequest(buf, cookie)
	return PutImageCookie{cookie}, buf
}
Ejemplo n.º 5
0
// CreatePixmapChecked sends a checked request.
// If an error occurs, it can be retrieved using CreatePixmapCookie.Check()
func CreatePixmapChecked(c *xgb.Conn, buf []byte, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) (CreatePixmapCookie, []byte) {
	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.")
	}
	cookie := c.NewCookie(true, false)
	buf = createPixmapRequest(c, buf, Pid, Drawable, Width, Height, Depth, Shmseg, Offset)
	c.NewRequest(buf, cookie)
	return CreatePixmapCookie{cookie}, buf
}
Ejemplo n.º 6
0
// EnableContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EnableContextUnchecked(c *xgb.Conn, buf []byte, Context Context) (EnableContextCookie, []byte) {
	if _, ok := c.Extensions["RECORD"]; !ok {
		panic("Cannot issue request 'EnableContext' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = enableContextRequest(c, buf, Context)
	c.NewRequest(buf, cookie)
	return EnableContextCookie{cookie}, buf
}
Ejemplo n.º 7
0
// Attach sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Attach(c *xgb.Conn, buf []byte, Shmseg Seg, Shmid uint32, ReadOnly bool) (AttachCookie, []byte) {
	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.")
	}
	cookie := c.NewCookie(false, false)
	buf = attachRequest(c, buf, Shmseg, Shmid, ReadOnly)
	c.NewRequest(buf, cookie)
	return AttachCookie{cookie}, buf
}
Ejemplo n.º 8
0
// RectanglesChecked sends a checked request.
// If an error occurs, it can be retrieved using RectanglesCookie.Check()
func RectanglesChecked(c *xgb.Conn, buf []byte, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) (RectanglesCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'Rectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = rectanglesRequest(c, buf, Operation, DestinationKind, Ordering, DestinationWindow, XOffset, YOffset, Rectangles)
	c.NewRequest(buf, cookie)
	return RectanglesCookie{cookie}, buf
}
Ejemplo n.º 9
0
// Mask sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Mask(c *xgb.Conn, buf []byte, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) (MaskCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'Mask' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, false)
	buf = maskRequest(c, buf, Operation, DestinationKind, DestinationWindow, XOffset, YOffset, SourceBitmap)
	c.NewRequest(buf, cookie)
	return MaskCookie{cookie}, buf
}
Ejemplo n.º 10
0
// CopyRegionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CopyRegionUnchecked(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) (CopyRegionCookie, []byte) {
	if _, ok := c.Extensions["DRI2"]; !ok {
		panic("Cannot issue request 'CopyRegion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = copyRegionRequest(c, buf, Drawable, Region, Dest, Src)
	c.NewRequest(buf, cookie)
	return CopyRegionCookie{cookie}, buf
}
Ejemplo n.º 11
0
// QueryVersion sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn, buf []byte) (QueryVersionCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, true)
	buf = queryVersionRequest(c, buf)
	c.NewRequest(buf, cookie)
	return QueryVersionCookie{cookie}, buf
}
Ejemplo n.º 12
0
// GetBuffersUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetBuffersUnchecked(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, Count uint32, Attachments []uint32) (GetBuffersCookie, []byte) {
	if _, ok := c.Extensions["DRI2"]; !ok {
		panic("Cannot issue request 'GetBuffers' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = getBuffersRequest(c, buf, Drawable, Count, Attachments)
	c.NewRequest(buf, cookie)
	return GetBuffersCookie{cookie}, buf
}
Ejemplo n.º 13
0
// DestroyDrawableChecked sends a checked request.
// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check()
func DestroyDrawableChecked(c *xgb.Conn, buf []byte, Drawable xproto.Drawable) (DestroyDrawableCookie, []byte) {
	if _, ok := c.Extensions["DRI2"]; !ok {
		panic("Cannot issue request 'DestroyDrawable' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = destroyDrawableRequest(c, buf, Drawable)
	c.NewRequest(buf, cookie)
	return DestroyDrawableCookie{cookie}, buf
}
Ejemplo n.º 14
0
// AuthenticateUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AuthenticateUnchecked(c *xgb.Conn, buf []byte, Window xproto.Window, Magic uint32) (AuthenticateCookie, []byte) {
	if _, ok := c.Extensions["DRI2"]; !ok {
		panic("Cannot issue request 'Authenticate' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = authenticateRequest(c, buf, Window, Magic)
	c.NewRequest(buf, cookie)
	return AuthenticateCookie{cookie}, buf
}
Ejemplo n.º 15
0
// RegisterClients sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func RegisterClients(c *xgb.Conn, buf []byte, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) (RegisterClientsCookie, []byte) {
	if _, ok := c.Extensions["RECORD"]; !ok {
		panic("Cannot issue request 'RegisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, false)
	buf = registerClientsRequest(c, buf, Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges)
	c.NewRequest(buf, cookie)
	return RegisterClientsCookie{cookie}, buf
}
Ejemplo n.º 16
0
// CombineChecked sends a checked request.
// If an error occurs, it can be retrieved using CombineCookie.Check()
func CombineChecked(c *xgb.Conn, buf []byte, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) (CombineCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'Combine' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = combineRequest(c, buf, Operation, DestinationKind, SourceKind, DestinationWindow, XOffset, YOffset, SourceWindow)
	c.NewRequest(buf, cookie)
	return CombineCookie{cookie}, buf
}
Ejemplo n.º 17
0
// UnregisterClientsChecked sends a checked request.
// If an error occurs, it can be retrieved using UnregisterClientsCookie.Check()
func UnregisterClientsChecked(c *xgb.Conn, buf []byte, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) (UnregisterClientsCookie, []byte) {
	if _, ok := c.Extensions["RECORD"]; !ok {
		panic("Cannot issue request 'UnregisterClients' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = unregisterClientsRequest(c, buf, Context, NumClientSpecs, ClientSpecs)
	c.NewRequest(buf, cookie)
	return UnregisterClientsCookie{cookie}, buf
}
Ejemplo n.º 18
0
// OffsetChecked sends a checked request.
// If an error occurs, it can be retrieved using OffsetCookie.Check()
func OffsetChecked(c *xgb.Conn, buf []byte, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) (OffsetCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'Offset' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = offsetRequest(c, buf, DestinationKind, DestinationWindow, XOffset, YOffset)
	c.NewRequest(buf, cookie)
	return OffsetCookie{cookie}, buf
}
Ejemplo n.º 19
0
// QueryVersionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn, buf []byte) (QueryVersionCookie, []byte) {
	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.")
	}
	cookie := c.NewCookie(false, true)
	buf = queryVersionRequest(c, buf)
	c.NewRequest(buf, cookie)
	return QueryVersionCookie{cookie}, buf
}
Ejemplo n.º 20
0
// QueryExtents sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryExtentsCookie.Reply()
func QueryExtents(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window) (QueryExtentsCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'QueryExtents' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, true)
	buf = queryExtentsRequest(c, buf, DestinationWindow)
	c.NewRequest(buf, cookie)
	return QueryExtentsCookie{cookie}, buf
}
Ejemplo n.º 21
0
// DetachChecked sends a checked request.
// If an error occurs, it can be retrieved using DetachCookie.Check()
func DetachChecked(c *xgb.Conn, buf []byte, Shmseg Seg) (DetachCookie, []byte) {
	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.")
	}
	cookie := c.NewCookie(true, false)
	buf = detachRequest(c, buf, Shmseg)
	c.NewRequest(buf, cookie)
	return DetachCookie{cookie}, buf
}
Ejemplo n.º 22
0
// SelectInputChecked sends a checked request.
// If an error occurs, it can be retrieved using SelectInputCookie.Check()
func SelectInputChecked(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window, Enable bool) (SelectInputCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'SelectInput' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = selectInputRequest(c, buf, DestinationWindow, Enable)
	c.NewRequest(buf, cookie)
	return SelectInputCookie{cookie}, buf
}
Ejemplo n.º 23
0
// GetImageUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetImageUnchecked(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) (GetImageCookie, []byte) {
	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.")
	}
	cookie := c.NewCookie(false, true)
	buf = getImageRequest(c, buf, Drawable, X, Y, Width, Height, PlaneMask, Format, Shmseg, Offset)
	c.NewRequest(buf, cookie)
	return GetImageCookie{cookie}, buf
}
Ejemplo n.º 24
0
// InputSelectedUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func InputSelectedUnchecked(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window) (InputSelectedCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'InputSelected' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = inputSelectedRequest(c, buf, DestinationWindow)
	c.NewRequest(buf, cookie)
	return InputSelectedCookie{cookie}, buf
}
Ejemplo n.º 25
0
// UnredirectSubwindowsChecked sends a checked request.
// If an error occurs, it can be retrieved using UnredirectSubwindowsCookie.Check()
func UnredirectSubwindowsChecked(c *xgb.Conn, buf []byte, Window xproto.Window, Update byte) (UnredirectSubwindowsCookie, []byte) {
	if _, ok := c.Extensions["COMPOSITE"]; !ok {
		panic("Cannot issue request 'UnredirectSubwindows' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = unredirectSubwindowsRequest(c, buf, Window, Update)
	c.NewRequest(buf, cookie)
	return UnredirectSubwindowsCookie{cookie}, buf
}
Ejemplo n.º 26
0
// GetRectanglesUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetRectanglesUnchecked(c *xgb.Conn, buf []byte, Window xproto.Window, SourceKind Kind) (GetRectanglesCookie, []byte) {
	if _, ok := c.Extensions["SHAPE"]; !ok {
		panic("Cannot issue request 'GetRectangles' using the uninitialized extension 'SHAPE'. shape.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = getRectanglesRequest(c, buf, Window, SourceKind)
	c.NewRequest(buf, cookie)
	return GetRectanglesCookie{cookie}, buf
}
Ejemplo n.º 27
0
// NameWindowPixmapChecked sends a checked request.
// If an error occurs, it can be retrieved using NameWindowPixmapCookie.Check()
func NameWindowPixmapChecked(c *xgb.Conn, buf []byte, Window xproto.Window, Pixmap xproto.Pixmap) (NameWindowPixmapCookie, []byte) {
	if _, ok := c.Extensions["COMPOSITE"]; !ok {
		panic("Cannot issue request 'NameWindowPixmap' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, false)
	buf = nameWindowPixmapRequest(c, buf, Window, Pixmap)
	c.NewRequest(buf, cookie)
	return NameWindowPixmapCookie{cookie}, buf
}
Ejemplo n.º 28
0
// QueryVersionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn, buf []byte, MajorVersion uint16, MinorVersion uint16) (QueryVersionCookie, []byte) {
	if _, ok := c.Extensions["RECORD"]; !ok {
		panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'RECORD'. record.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = queryVersionRequest(c, buf, MajorVersion, MinorVersion)
	c.NewRequest(buf, cookie)
	return QueryVersionCookie{cookie}, buf
}
Ejemplo n.º 29
0
// QueryVersionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn, buf []byte, ClientMajorVersion uint32, ClientMinorVersion uint32) (QueryVersionCookie, []byte) {
	if _, ok := c.Extensions["COMPOSITE"]; !ok {
		panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'Composite'. composite.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(false, true)
	buf = queryVersionRequest(c, buf, ClientMajorVersion, ClientMinorVersion)
	c.NewRequest(buf, cookie)
	return QueryVersionCookie{cookie}, buf
}
Ejemplo n.º 30
0
// QueryVersion sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn, buf []byte, MajorVersion uint32, MinorVersion uint32) (QueryVersionCookie, []byte) {
	if _, ok := c.Extensions["DRI2"]; !ok {
		panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'DRI2'. dri2.Init(connObj) must be called first.")
	}
	cookie := c.NewCookie(true, true)
	buf = queryVersionRequest(c, buf, MajorVersion, MinorVersion)
	c.NewRequest(buf, cookie)
	return QueryVersionCookie{cookie}, buf
}