shape

package
v0.0.0-...-deaf085 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2021 License: BSD-3-Clause, GooglePatentClause Imports: 2 Imported by: 0

Documentation

Overview

Package shape is the X client API for the SHAPE extension.

Index

Constants

View Source
const (
	SkBounding = 0
	SkClip     = 1
	SkInput    = 2
)
View Source
const (
	SoSet       = 0
	SoUnion     = 1
	SoIntersect = 2
	SoSubtract  = 3
	SoInvert    = 4
)
View Source
const Notify = 0

Notify is the event number for a NotifyEvent.

Variables

This section is empty.

Functions

func Init

func Init(c *xgb.Conn) error

Init must be called before using the SHAPE extension.

func NotifyEventNew

func NotifyEventNew(buf []byte) xgb.Event

NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.

Types

type CombineCookie

type CombineCookie struct {
	*xgb.Cookie
}

CombineCookie is a cookie used only for Combine requests.

func Combine

func Combine(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie

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, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie

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

type GetRectanglesCookie struct {
	*xgb.Cookie
}

GetRectanglesCookie is a cookie used only for GetRectangles requests.

func GetRectangles

func GetRectangles(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectanglesCookie

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, Window xproto.Window, SourceKind Kind) GetRectanglesCookie

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

type InputSelectedCookie struct {
	*xgb.Cookie
}

InputSelectedCookie is a cookie used only for InputSelected requests.

func InputSelected

func InputSelected(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie

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, DestinationWindow xproto.Window) InputSelectedCookie

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 Kind

type Kind byte

type MaskCookie

type MaskCookie struct {
	*xgb.Cookie
}

MaskCookie is a cookie used only for Mask requests.

func Mask

func Mask(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie

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, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie

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

type OffsetCookie struct {
	*xgb.Cookie
}

OffsetCookie is a cookie used only for Offset requests.

func Offset

func Offset(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie

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, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie

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 Op

type Op byte

type QueryExtentsCookie

type QueryExtentsCookie struct {
	*xgb.Cookie
}

QueryExtentsCookie is a cookie used only for QueryExtents requests.

func QueryExtents

func QueryExtents(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie

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, DestinationWindow xproto.Window) QueryExtentsCookie

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

type QueryVersionCookie struct {
	*xgb.Cookie
}

QueryVersionCookie is a cookie used only for QueryVersion requests.

func QueryVersion

func QueryVersion(c *xgb.Conn) QueryVersionCookie

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) QueryVersionCookie

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

type RectanglesCookie struct {
	*xgb.Cookie
}

RectanglesCookie is a cookie used only for Rectangles requests.

func Rectangles

func Rectangles(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie

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, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie

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

type SelectInputCookie struct {
	*xgb.Cookie
}

SelectInputCookie is a cookie used only for SelectInput requests.

func SelectInput

func SelectInput(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie

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, DestinationWindow xproto.Window, Enable bool) SelectInputCookie

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL