Documentation ¶
Overview ¶
Package shape is the X client API for the SHAPE extension.
Index ¶
- Constants
- func Init(c *xgb.Conn) error
- func NotifyEventNew(buf []byte) xgb.Event
- type CombineCookie
- type GetRectanglesCookie
- type GetRectanglesReply
- type InputSelectedCookie
- type InputSelectedReply
- type Kind
- type MaskCookie
- type NotifyEvent
- type OffsetCookie
- type Op
- type QueryExtentsCookie
- type QueryExtentsReply
- type QueryVersionCookie
- type QueryVersionReply
- type RectanglesCookie
- type SelectInputCookie
Constants ¶
const ( SoSet = 0 SoUnion = 1 SoIntersect = 2 SoSubtract = 3 SoInvert = 4 )
const ( SkBounding = 0 SkClip = 1 SkInput = 2 )
const Notify = 0
Notify is the event number for a NotifyEvent.
Variables ¶
This section is empty.
Functions ¶
func NotifyEventNew ¶
NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
Types ¶
type CombineCookie ¶
CombineCookie is a cookie used only for Combine requests.
func Combine ¶
func Combine(c *xgb.Conn, buf []byte, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) (CombineCookie, []byte)
Combine sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CombineChecked ¶
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)
CombineChecked sends a checked request. If an error occurs, it can be retrieved using CombineCookie.Check()
func (CombineCookie) Check ¶
func (cook CombineCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.
type GetRectanglesCookie ¶
GetRectanglesCookie is a cookie used only for GetRectangles requests.
func GetRectangles ¶
func GetRectangles(c *xgb.Conn, buf []byte, Window xproto.Window, SourceKind Kind) (GetRectanglesCookie, []byte)
GetRectangles sends a checked request. If an error occurs, it will be returned with the reply by calling GetRectanglesCookie.Reply()
func GetRectanglesUnchecked ¶
func GetRectanglesUnchecked(c *xgb.Conn, buf []byte, Window xproto.Window, SourceKind Kind) (GetRectanglesCookie, []byte)
GetRectanglesUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (GetRectanglesCookie) Reply ¶
func (cook GetRectanglesCookie) Reply() (*GetRectanglesReply, error)
Reply blocks and returns the reply data for a GetRectangles request.
type GetRectanglesReply ¶
type GetRectanglesReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply Ordering byte RectanglesLen uint32 // padding: 20 bytes Rectangles []xproto.Rectangle // size: xgb.Pad((int(RectanglesLen) * 8)) }
GetRectanglesReply represents the data returned from a GetRectangles request.
type InputSelectedCookie ¶
InputSelectedCookie is a cookie used only for InputSelected requests.
func InputSelected ¶
func InputSelected(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window) (InputSelectedCookie, []byte)
InputSelected sends a checked request. If an error occurs, it will be returned with the reply by calling InputSelectedCookie.Reply()
func InputSelectedUnchecked ¶
func InputSelectedUnchecked(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window) (InputSelectedCookie, []byte)
InputSelectedUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (InputSelectedCookie) Reply ¶
func (cook InputSelectedCookie) Reply() (*InputSelectedReply, error)
Reply blocks and returns the reply data for a InputSelected request.
type InputSelectedReply ¶
type InputSelectedReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply Enabled bool }
InputSelectedReply represents the data returned from a InputSelected request.
type MaskCookie ¶
MaskCookie is a cookie used only for Mask requests.
func Mask ¶
func Mask(c *xgb.Conn, buf []byte, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) (MaskCookie, []byte)
Mask sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func MaskChecked ¶
func MaskChecked(c *xgb.Conn, buf []byte, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) (MaskCookie, []byte)
MaskChecked sends a checked request. If an error occurs, it can be retrieved using MaskCookie.Check()
func (MaskCookie) Check ¶
func (cook MaskCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.
type NotifyEvent ¶
type NotifyEvent struct { Sequence uint16 ShapeKind Kind AffectedWindow xproto.Window ExtentsX int16 ExtentsY int16 ExtentsWidth uint16 ExtentsHeight uint16 ServerTime xproto.Timestamp Shaped bool }
func (NotifyEvent) Bytes ¶
func (v NotifyEvent) Bytes() []byte
Bytes writes a NotifyEvent value to a byte slice.
func (NotifyEvent) SequenceId ¶
func (v NotifyEvent) SequenceId() uint16
SequenceId returns the sequence id attached to the Notify event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.
func (NotifyEvent) String ¶
func (v NotifyEvent) String() string
String is a rudimentary string representation of NotifyEvent.
type OffsetCookie ¶
OffsetCookie is a cookie used only for Offset requests.
func Offset ¶
func Offset(c *xgb.Conn, buf []byte, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) (OffsetCookie, []byte)
Offset sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func OffsetChecked ¶
func OffsetChecked(c *xgb.Conn, buf []byte, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) (OffsetCookie, []byte)
OffsetChecked sends a checked request. If an error occurs, it can be retrieved using OffsetCookie.Check()
func (OffsetCookie) Check ¶
func (cook OffsetCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.
type QueryExtentsCookie ¶
QueryExtentsCookie is a cookie used only for QueryExtents requests.
func QueryExtents ¶
func QueryExtents(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window) (QueryExtentsCookie, []byte)
QueryExtents sends a checked request. If an error occurs, it will be returned with the reply by calling QueryExtentsCookie.Reply()
func QueryExtentsUnchecked ¶
func QueryExtentsUnchecked(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window) (QueryExtentsCookie, []byte)
QueryExtentsUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (QueryExtentsCookie) Reply ¶
func (cook QueryExtentsCookie) Reply() (*QueryExtentsReply, error)
Reply blocks and returns the reply data for a QueryExtents request.
type QueryExtentsReply ¶
type QueryExtentsReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes BoundingShaped bool ClipShaped bool // padding: 2 bytes BoundingShapeExtentsX int16 BoundingShapeExtentsY int16 BoundingShapeExtentsWidth uint16 BoundingShapeExtentsHeight uint16 ClipShapeExtentsX int16 ClipShapeExtentsY int16 ClipShapeExtentsWidth uint16 ClipShapeExtentsHeight uint16 }
QueryExtentsReply represents the data returned from a QueryExtents request.
type QueryVersionCookie ¶
QueryVersionCookie is a cookie used only for QueryVersion requests.
func QueryVersion ¶
func QueryVersion(c *xgb.Conn, buf []byte) (QueryVersionCookie, []byte)
QueryVersion sends a checked request. If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersionUnchecked ¶
func QueryVersionUnchecked(c *xgb.Conn, buf []byte) (QueryVersionCookie, []byte)
QueryVersionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (QueryVersionCookie) Reply ¶
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)
Reply blocks and returns the reply data for a QueryVersion request.
type QueryVersionReply ¶
type QueryVersionReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes MajorVersion uint16 MinorVersion uint16 }
QueryVersionReply represents the data returned from a QueryVersion request.
type RectanglesCookie ¶
RectanglesCookie is a cookie used only for Rectangles requests.
func Rectangles ¶
func Rectangles(c *xgb.Conn, buf []byte, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) (RectanglesCookie, []byte)
Rectangles sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func RectanglesChecked ¶
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)
RectanglesChecked sends a checked request. If an error occurs, it can be retrieved using RectanglesCookie.Check()
func (RectanglesCookie) Check ¶
func (cook RectanglesCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.
type SelectInputCookie ¶
SelectInputCookie is a cookie used only for SelectInput requests.
func SelectInput ¶
func SelectInput(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window, Enable bool) (SelectInputCookie, []byte)
SelectInput sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectInputChecked ¶
func SelectInputChecked(c *xgb.Conn, buf []byte, DestinationWindow xproto.Window, Enable bool) (SelectInputCookie, []byte)
SelectInputChecked sends a checked request. If an error occurs, it can be retrieved using SelectInputCookie.Check()
func (SelectInputCookie) Check ¶
func (cook SelectInputCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.