Documentation ¶
Overview ¶
Based on https://github.com/BurntSushi/xgb/blob/master/xtest/xtest.go
Based on https://github.com/BurntSushi/xgb/blob/master/xtest/xtest.go
Index ¶
Constants ¶
const XkbAccessXNotify = 10
const XkbActionMessage = 9
const XkbAllEventsMask = 4095
const XkbBellNotify = 8
const XkbCompatMapNotify = 7
const XkbControlsNotify = 3
const XkbExtensionDeviceNotify = 11
const XkbGroupNamesMask = (1 << 12)
const XkbIndicatorMapNotify = 5
const XkbIndicatorStateNotify = 4
const XkbMapNotify = 1
const XkbNamesNotify = 6
const XkbNewKeyboardNotify = 0
const XkbStateNotify = 2
const XkbSymbolsNameMask = (1 << 2)
Variables ¶
This section is empty.
Functions ¶
func XkbEventNew ¶
KeyPressEventNew constructs a KeyPressEvent value that implements xgb.Event from a byte slice.
Types ¶
type GetNamesCookie ¶
GetVersionCookie is a cookie used only for GetVersion requests.
func GetNames ¶
func GetNames(c *xgb.Conn, which uint32) GetNamesCookie
GetVersion sends a checked request. If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
func (GetNamesCookie) Reply ¶
func (cook GetNamesCookie) Reply() (*GetNamesReply, error)
Reply blocks and returns the reply data for a GetNames request.
type GetNamesReply ¶
type GetNamesReply struct { DeviceId byte Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply Which uint32 MinKeyCode byte MaxKeyCode byte NTypes byte GroupNames byte VirtualMods uint16 FirstKey byte NKeys byte Indicators uint32 NRadioGroups byte NKeyAliases byte NKTLevels uint16 ValueList uint32 }
GetNamesReply represents the data returned from a GetNames request.
type GetStateCookie ¶
GetStateCookie is a cookie used only for GetState requests.
func GetState ¶
func GetState(c *xgb.Conn, deviceSpec uint16) GetStateCookie
GetState sends a checked request. If an error occurs, it will be returned with the reply by calling GetStateCookie.Reply()
func GetStateUnchecked ¶
func GetStateUnchecked(c *xgb.Conn, deviceSpec uint16) GetStateCookie
GetStateUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (GetStateCookie) Reply ¶
func (cook GetStateCookie) Reply() (*GetStateReply, error)
Reply blocks and returns the reply data for a GetState request.
type GetStateReply ¶
type GetStateReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply Type byte DeviceId byte Mods byte BaseMods byte LatchedMods byte LockedMods byte Group byte LockedGroup byte BaseGroup uint16 LatchedGroup uint16 CompatState byte GrabMods byte CompatGrabMods byte LookupMods byte CompatLookupMods byte PtrBtnState uint16 }
GetStateReply represents the data returned from a GetState request.
type GetVersionCookie ¶
GetVersionCookie is a cookie used only for GetVersion requests.
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 ¶
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 }
GetVersionReply represents the data returned from a GetVersion request.
type LatchLockStateCookie ¶
func LatchLockState ¶
func LatchLockState(c *xgb.Conn, data []byte) LatchLockStateCookie
SelectEvents selects events from X11 X11 sends no reply for this command
type SelectEventsCookie ¶
func SelectEvents ¶
func SelectEvents(c *xgb.Conn, data []byte) SelectEventsCookie
SelectEvents selects events from X11 X11 sends no reply for this command
type XkbEvent ¶
type XkbEvent struct { Sequence uint16 Type byte Time xproto.Timestamp Root xproto.Window Event xproto.Window Child xproto.Window RootX int16 RootY int16 EventX int16 EventY int16 State uint16 SameScreen bool }
func (XkbEvent) SequenceId ¶
SequenceId returns the sequence id attached to the KeyPress event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.