...

Package xtest

import "github.com/jezek/xgb/xtest"
Overview
Index

Overview ▾

Package xtest is the X client API for the XTEST extension.

Constants

const (
    CursorNone    = 0
    CursorCurrent = 1
)

func Init

func Init(c *xgb.Conn) error

Init must be called before using the XTEST extension.

type CompareCursorCookie

CompareCursorCookie is a cookie used only for CompareCursor requests.

type CompareCursorCookie struct {
    *xgb.Cookie
}

func CompareCursor

func CompareCursor(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie

CompareCursor sends a checked request. If an error occurs, it will be returned with the reply by calling CompareCursorCookie.Reply()

func CompareCursorUnchecked

func CompareCursorUnchecked(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie

CompareCursorUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (CompareCursorCookie) Reply

func (cook CompareCursorCookie) Reply() (*CompareCursorReply, error)

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

type CompareCursorReply

CompareCursorReply represents the data returned from a CompareCursor request.

type CompareCursorReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    Same     bool
}

type FakeInputCookie

FakeInputCookie is a cookie used only for FakeInput requests.

type FakeInputCookie struct {
    *xgb.Cookie
}

func FakeInput

func FakeInput(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie

FakeInput sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func FakeInputChecked

func FakeInputChecked(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie

FakeInputChecked sends a checked request. If an error occurs, it can be retrieved using FakeInputCookie.Check()

func (FakeInputCookie) Check

func (cook FakeInputCookie) 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 GetVersionCookie

GetVersionCookie is a cookie used only for GetVersion requests.

type GetVersionCookie struct {
    *xgb.Cookie
}

func GetVersion

func GetVersion(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie

GetVersion sends a checked request. If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()

func GetVersionUnchecked

func GetVersionUnchecked(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie

GetVersionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (GetVersionCookie) Reply

func (cook GetVersionCookie) Reply() (*GetVersionReply, error)

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

type GetVersionReply

GetVersionReply represents the data returned from a GetVersion request.

type GetVersionReply struct {
    Sequence     uint16 // sequence number of the request for this reply
    Length       uint32 // number of bytes in this reply
    MajorVersion byte
    MinorVersion uint16
}

type GrabControlCookie

GrabControlCookie is a cookie used only for GrabControl requests.

type GrabControlCookie struct {
    *xgb.Cookie
}

func GrabControl

func GrabControl(c *xgb.Conn, Impervious bool) GrabControlCookie

GrabControl sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func GrabControlChecked

func GrabControlChecked(c *xgb.Conn, Impervious bool) GrabControlCookie

GrabControlChecked sends a checked request. If an error occurs, it can be retrieved using GrabControlCookie.Check()

func (GrabControlCookie) Check

func (cook GrabControlCookie) 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.