xgb: github.com/BurntSushi/xgb/shape Index | Files

package shape

import "github.com/BurntSushi/xgb/shape"

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

Index

Package Files

shape.go

Constants

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

Notify is the event number for a NotifyEvent.

func Init Uses

func Init(c *xgb.Conn) error

Init must be called before using the SHAPE extension.

func NotifyEventNew Uses

func NotifyEventNew(buf []byte) xgb.Event

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

type CombineCookie Uses

type CombineCookie struct {
    *xgb.Cookie
}

CombineCookie is a cookie used only for Combine requests.

func Combine Uses

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 Uses

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 Uses

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 Uses

type GetRectanglesCookie struct {
    *xgb.Cookie
}

GetRectanglesCookie is a cookie used only for GetRectangles requests.

func GetRectangles Uses

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 Uses

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 Uses

func (cook GetRectanglesCookie) Reply() (*GetRectanglesReply, error)

Reply blocks and returns the reply data for a GetRectangles request.

type GetRectanglesReply Uses

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 Uses

type InputSelectedCookie struct {
    *xgb.Cookie
}

InputSelectedCookie is a cookie used only for InputSelected requests.

func InputSelected Uses

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 Uses

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 Uses

func (cook InputSelectedCookie) Reply() (*InputSelectedReply, error)

Reply blocks and returns the reply data for a InputSelected request.

type InputSelectedReply Uses

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 Uses

type Kind byte

type MaskCookie Uses

type MaskCookie struct {
    *xgb.Cookie
}

MaskCookie is a cookie used only for Mask requests.

func Mask Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (v NotifyEvent) Bytes() []byte

Bytes writes a NotifyEvent value to a byte slice.

func (NotifyEvent) SequenceId Uses

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 Uses

func (v NotifyEvent) String() string

String is a rudimentary string representation of NotifyEvent.

type OffsetCookie Uses

type OffsetCookie struct {
    *xgb.Cookie
}

OffsetCookie is a cookie used only for Offset requests.

func Offset Uses

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 Uses

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 Uses

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 Uses

type Op byte

type QueryExtentsCookie Uses

type QueryExtentsCookie struct {
    *xgb.Cookie
}

QueryExtentsCookie is a cookie used only for QueryExtents requests.

func QueryExtents Uses

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 Uses

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 Uses

func (cook QueryExtentsCookie) Reply() (*QueryExtentsReply, error)

Reply blocks and returns the reply data for a QueryExtents request.

type QueryExtentsReply Uses

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 Uses

type QueryVersionCookie struct {
    *xgb.Cookie
}

QueryVersionCookie is a cookie used only for QueryVersion requests.

func QueryVersion Uses

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 Uses

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 Uses

func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)

Reply blocks and returns the reply data for a QueryVersion request.

type QueryVersionReply Uses

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 Uses

type RectanglesCookie struct {
    *xgb.Cookie
}

RectanglesCookie is a cookie used only for Rectangles requests.

func Rectangles Uses

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 Uses

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 Uses

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 Uses

type SelectInputCookie struct {
    *xgb.Cookie
}

SelectInputCookie is a cookie used only for SelectInput requests.

func SelectInput Uses

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 Uses

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 Uses

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.

Package shape imports 2 packages (graph) and is imported by 41 packages. Updated 2016-11-06. Refresh now. Tools for package owners.