Package ge

import "github.com/BurntSushi/xgb/ge"
Overview
Index

Overview ▾

Package ge is the X client API for the Generic Event Extension extension.

func Init

func Init(c *xgb.Conn) error

Init must be called before using the Generic Event Extension extension.

type QueryVersionCookie

type QueryVersionCookie struct {
    *xgb.Cookie
}

QueryVersionCookie is a cookie used only for QueryVersion requests.

func QueryVersion

func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) 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, ClientMajorVersion uint16, ClientMinorVersion uint16) 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.