input

package
v0.0.0-...-7ad2634 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeviceUseIsXPointer           = 0
	DeviceUseIsXKeyboard          = 1
	DeviceUseIsXExtensionDevice   = 2
	DeviceUseIsXExtensionKeyboard = 3
	DeviceUseIsXExtensionPointer  = 4
)

enum DeviceUse

View Source
const (
	InputClassKey       = 0
	InputClassButton    = 1
	InputClassValuator  = 2
	InputClassFeedback  = 3
	InputClassProximity = 4
	InputClassFocus     = 5
	InputClassOther     = 6
)

enum InputClass

View Source
const (
	ValuatorModeRelative = 0
	ValuatorModeAbsolute = 1
)

enum ValuatorMode

View Source
const (
	PropagateModeAddToList      = 0
	PropagateModeDeleteFromList = 1
)

enum PropagateMode

View Source
const (
	DeviceInputModeAsyncThisDevice   = 0
	DeviceInputModeSyncThisDevice    = 1
	DeviceInputModeReplayThisDevice  = 2
	DeviceInputModeAsyncOtherDevices = 3
	DeviceInputModeAsyncAll          = 4
	DeviceInputModeSyncAll           = 5
)

enum DeviceInputMode

View Source
const (
	FeedbackClassKeyboard = 0
	FeedbackClassPointer  = 1
	FeedbackClassString   = 2
	FeedbackClassInteger  = 3
	FeedbackClassLed      = 4
	FeedbackClassBell     = 5
)

enum FeedbackClass

View Source
const (
	ChangeFeedbackControlMaskKeyClickPercent = 1
	ChangeFeedbackControlMaskPercent         = 2
	ChangeFeedbackControlMaskPitch           = 4
	ChangeFeedbackControlMaskDuration        = 8
	ChangeFeedbackControlMaskLed             = 16
	ChangeFeedbackControlMaskLedMode         = 32
	ChangeFeedbackControlMaskKey             = 64
	ChangeFeedbackControlMaskAutoRepeatMode  = 128
	ChangeFeedbackControlMaskString          = 1
	ChangeFeedbackControlMaskInteger         = 1
	ChangeFeedbackControlMaskAccelNum        = 1
	ChangeFeedbackControlMaskAccelDenom      = 2
	ChangeFeedbackControlMaskThreshold       = 4
)

enum ChangeFeedbackControlMask

View Source
const (
	ValuatorStateModeMaskDeviceModeAbsolute = 1
	ValuatorStateModeMaskOutOfProximity     = 2
)

enum ValuatorStateModeMask

View Source
const (
	DeviceControlResolution = 1
	DeviceControlAbsCalib   = 2
	DeviceControlCore       = 3
	DeviceControlEnable     = 4
	DeviceControlAbsArea    = 5
)

enum DeviceControl

View Source
const (
	PropertyFormat8Bits  = 8
	PropertyFormat16Bits = 16
	PropertyFormat32Bits = 32
)

enum PropertyFormat

View Source
const (
	DeviceAll       = 0
	DeviceAllMaster = 1
)

enum Device

View Source
const (
	HierarchyChangeTypeAddMaster    = 1
	HierarchyChangeTypeRemoveMaster = 2
	HierarchyChangeTypeAttachSlave  = 3
	HierarchyChangeTypeDetachSlave  = 4
)

enum HierarchyChangeType

View Source
const (
	ChangeModeAttach = 1
	ChangeModeFloat  = 2
)

enum ChangeMode

View Source
const (
	XIEventMaskDeviceChanged    = 2
	XIEventMaskKeyPress         = 4
	XIEventMaskKeyRelease       = 8
	XIEventMaskButtonPress      = 16
	XIEventMaskButtonRelease    = 32
	XIEventMaskMotion           = 64
	XIEventMaskEnter            = 128
	XIEventMaskLeave            = 256
	XIEventMaskFocusIn          = 512
	XIEventMaskFocusOut         = 1024
	XIEventMaskHierarchy        = 2048
	XIEventMaskProperty         = 4096
	XIEventMaskRawKeyPress      = 8192
	XIEventMaskRawKeyRelease    = 16384
	XIEventMaskRawButtonPress   = 32768
	XIEventMaskRawButtonRelease = 65536
	XIEventMaskRawMotion        = 131072
	XIEventMaskTouchBegin       = 262144
	XIEventMaskTouchUpdate      = 524288
	XIEventMaskTouchEnd         = 1048576
	XIEventMaskTouchOwnership   = 2097152
	XIEventMaskRawTouchBegin    = 4194304
	XIEventMaskRawTouchUpdate   = 8388608
	XIEventMaskRawTouchEnd      = 16777216
	XIEventMaskBarrierHit       = 33554432
	XIEventMaskBarrierLeave     = 67108864
)

enum XIEventMask

View Source
const (
	DeviceClassTypeKey      = 0
	DeviceClassTypeButton   = 1
	DeviceClassTypeValuator = 2
	DeviceClassTypeScroll   = 3
	DeviceClassTypeTouch    = 8
)

enum DeviceClassType

View Source
const (
	DeviceTypeMasterPointer  = 1
	DeviceTypeMasterKeyboard = 2
	DeviceTypeSlavePointer   = 3
	DeviceTypeSlaveKeyboard  = 4
	DeviceTypeFloatingSlave  = 5
)

enum DeviceType

View Source
const (
	ScrollFlagsNoEmulation = 1
	ScrollFlagsPreferred   = 2
)

enum ScrollFlags

View Source
const (
	ScrollTypeVertical   = 1
	ScrollTypeHorizontal = 2
)

enum ScrollType

View Source
const (
	TouchModeDirect    = 1
	TouchModeDependent = 2
)

enum TouchMode

View Source
const (
	GrabOwnerNoOwner = 0
	GrabOwnerOwner   = 1
)

enum GrabOwner

View Source
const (
	EventModeAsyncDevice       = 0
	EventModeSyncDevice        = 1
	EventModeReplayDevice      = 2
	EventModeAsyncPairedDevice = 3
	EventModeAsyncPair         = 4
	EventModeSyncPair          = 5
	EventModeAcceptTouch       = 6
	EventModeRejectTouch       = 7
)

enum EventMode

View Source
const (
	GrabMode22Sync  = 0
	GrabMode22Async = 1
	GrabMode22Touch = 2
)

enum GrabMode22

View Source
const (
	GrabTypeButton     = 0
	GrabTypeKeycode    = 1
	GrabTypeEnter      = 2
	GrabTypeFocusIn    = 3
	GrabTypeTouchBegin = 4
)

enum GrabType

View Source
const (
	ClassesReportedMaskOutOfProximity     = 128
	ClassesReportedMaskDeviceModeAbsolute = 64
	ClassesReportedMaskReportingValuators = 4
	ClassesReportedMaskReportingButtons   = 2
	ClassesReportedMaskReportingKeys      = 1
)

enum ClassesReportedMask

View Source
const (
	ChangeDeviceNewPointer  = 0
	ChangeDeviceNewKeyboard = 1
)

enum ChangeDevice

View Source
const (
	DeviceChangeAdded          = 0
	DeviceChangeRemoved        = 1
	DeviceChangeEnabled        = 2
	DeviceChangeDisabled       = 3
	DeviceChangeUnrecoverable  = 4
	DeviceChangeControlChanged = 5
)

enum DeviceChange

View Source
const (
	ChangeReasonSlaveSwitch  = 1
	ChangeReasonDeviceChange = 2
)

enum ChangeReason

View Source
const (
	NotifyModeNormal        = 0
	NotifyModeGrab          = 1
	NotifyModeUngrab        = 2
	NotifyModeWhileGrabbed  = 3
	NotifyModePassiveGrab   = 4
	NotifyModePassiveUngrab = 5
)

enum NotifyMode

View Source
const (
	NotifyDetailAncestor         = 0
	NotifyDetailVirtual          = 1
	NotifyDetailInferior         = 2
	NotifyDetailNonlinear        = 3
	NotifyDetailNonlinearVirtual = 4
	NotifyDetailPointer          = 5
	NotifyDetailPointerRoot      = 6
	NotifyDetailNone             = 7
)

enum NotifyDetail

View Source
const (
	HierarchyMaskMasterAdded    = 1
	HierarchyMaskMasterRemoved  = 2
	HierarchyMaskSlaveAdded     = 4
	HierarchyMaskSlaveRemoved   = 8
	HierarchyMaskSlaveAttached  = 16
	HierarchyMaskSlaveDetached  = 32
	HierarchyMaskDeviceEnabled  = 64
	HierarchyMaskDeviceDisabled = 128
)

enum HierarchyMask

View Source
const (
	PropertyFlagDeleted  = 0
	PropertyFlagCreated  = 1
	PropertyFlagModified = 2
)

enum PropertyFlag

View Source
const (
	TouchEventFlagsTouchPendingEnd       = 65536
	TouchEventFlagsTouchEmulatingPointer = 131072
)

enum TouchEventFlags

View Source
const (
	BarrierFlagsPointerReleased = 1
	BarrierFlagsDeviceIsGrabbed = 2
)

enum BarrierFlags

View Source
const AllowDeviceEventsOpcode = 19
View Source
const BarrierHitEventCode = 25
View Source
const BarrierLeaveEventCode = 26
View Source
const ButtonPressEventCode = 4
View Source
const ButtonReleaseEventCode = 5
View Source
const ChangeDeviceControlOpcode = 35
View Source
const ChangeDeviceDontPropagateListOpcode = 8
View Source
const ChangeDeviceKeyMappingOpcode = 25
View Source
const ChangeDeviceNotifyEventCode = 12
View Source
const ChangeDevicePropertyOpcode = 37
View Source
const ChangeFeedbackControlOpcode = 23
View Source
const ChangeKeyboardDeviceOpcode = 11
View Source
const ChangePointerDeviceOpcode = 12
View Source
const ClassErrorCode = 4
View Source
const CloseDeviceOpcode = 4
View Source
const DeleteDevicePropertyOpcode = 38
View Source
const DeviceBellOpcode = 32
View Source
const DeviceBusyErrorCode = 3
View Source
const DeviceButtonPressEventCode = 3
View Source
const DeviceButtonReleaseEventCode = 4
View Source
const DeviceButtonStateNotifyEventCode = 14
View Source
const DeviceChangedEventCode = 1
View Source
const DeviceErrorCode = 0
View Source
const DeviceFocusInEventCode = 6
View Source
const DeviceFocusOutEventCode = 7
View Source
const DeviceKeyPressEventCode = 1
View Source
const DeviceKeyReleaseEventCode = 2
View Source
const DeviceKeyStateNotifyEventCode = 13
View Source
const DeviceMappingNotifyEventCode = 11
View Source
const DeviceMotionNotifyEventCode = 5
View Source
const DevicePresenceNotifyEventCode = 15
View Source
const DevicePropertyNotifyEventCode = 16
View Source
const DeviceStateNotifyEventCode = 10
View Source
const DeviceValuatorEventCode = 0
View Source
const EnterEventCode = 7
View Source
const EventErrorCode = 1
View Source
const FocusInEventCode = 9
View Source
const FocusOutEventCode = 10
View Source
const GetDeviceButtonMappingOpcode = 28
View Source
const GetDeviceControlOpcode = 34
View Source
const GetDeviceDontPropagateListOpcode = 9
View Source
const GetDeviceFocusOpcode = 20
View Source
const GetDeviceKeyMappingOpcode = 24
View Source
const GetDeviceModifierMappingOpcode = 26
View Source
const GetDeviceMotionEventsOpcode = 10
View Source
const GetDevicePropertyOpcode = 39
View Source
const GetExtensionVersionOpcode = 1
View Source
const GetFeedbackControlOpcode = 22
View Source
const GetSelectedExtensionEventsOpcode = 7
View Source
const GrabDeviceButtonOpcode = 17
View Source
const GrabDeviceKeyOpcode = 15
View Source
const GrabDeviceOpcode = 13
View Source
const HierarchyEventCode = 11
View Source
const (
	KeyEventFlagsKeyRepeat = 65536
)

enum KeyEventFlags

View Source
const KeyPressEventCode = 2
View Source
const KeyReleaseEventCode = 3
View Source
const LeaveEventCode = 8
View Source
const ListDevicePropertiesOpcode = 36
View Source
const ListInputDevicesOpcode = 2
View Source
const MajorVersion = 2

_ns.ext_name: Input

View Source
const MinorVersion = 3
View Source
const ModeErrorCode = 2
View Source
const (
	ModifierDeviceUseXKeyboard = 255
)

enum ModifierDevice

View Source
const (
	ModifierMaskAny = 2147483648
)

enum ModifierMask

View Source
const (
	MoreEventsMaskMoreEvents = 128
)

enum MoreEventsMask

View Source
const MotionEventCode = 6
View Source
const OpenDeviceOpcode = 3
View Source
const (
	PointerEventFlagsPointerEmulated = 65536
)

enum PointerEventFlags

View Source
const PropertyEventCode = 12
View Source
const ProximityInEventCode = 8
View Source
const ProximityOutEventCode = 9
View Source
const QueryDeviceStateOpcode = 30
View Source
const RawButtonPressEventCode = 15
View Source
const RawButtonReleaseEventCode = 16
View Source
const RawKeyPressEventCode = 13
View Source
const RawKeyReleaseEventCode = 14
View Source
const RawMotionEventCode = 17
View Source
const RawTouchBeginEventCode = 22
View Source
const RawTouchEndEventCode = 24
View Source
const RawTouchUpdateEventCode = 23
View Source
const SelectExtensionEventOpcode = 6
View Source
const SendExtensionEventOpcode = 31
View Source
const SetDeviceButtonMappingOpcode = 29
View Source
const SetDeviceFocusOpcode = 21
View Source
const SetDeviceModeOpcode = 5
View Source
const SetDeviceModifierMappingOpcode = 27
View Source
const SetDeviceValuatorsOpcode = 33
View Source
const TouchBeginEventCode = 18
View Source
const TouchEndEventCode = 20
View Source
const TouchOwnershipEventCode = 21
View Source
const (
	TouchOwnershipFlagsNone = 0
)

enum TouchOwnershipFlags

View Source
const TouchUpdateEventCode = 19
View Source
const UngrabDeviceButtonOpcode = 18
View Source
const UngrabDeviceKeyOpcode = 16
View Source
const UngrabDeviceOpcode = 14
View Source
const XIAllowEventsOpcode = 53
View Source
const XIBarrierReleasePointerOpcode = 61
View Source
const XIChangeCursorOpcode = 42
View Source
const XIChangeHierarchyOpcode = 43
View Source
const XIChangePropertyOpcode = 57
View Source
const XIDeletePropertyOpcode = 58
View Source
const XIGetClientPointerOpcode = 45
View Source
const XIGetFocusOpcode = 50
View Source
const XIGetPropertyOpcode = 59
View Source
const XIGetSelectedEventsOpcode = 60
View Source
const XIGrabDeviceOpcode = 51
View Source
const XIListPropertiesOpcode = 56
View Source
const XIPassiveGrabDeviceOpcode = 54
View Source
const XIPassiveUngrabDeviceOpcode = 55
View Source
const XIQueryDeviceOpcode = 48
View Source
const XIQueryPointerOpcode = 40
View Source
const XIQueryVersionOpcode = 47
View Source
const XISelectEventsOpcode = 46
View Source
const XISetClientPointerOpcode = 44
View Source
const XISetFocusOpcode = 49
View Source
const XIUngrabDeviceOpcode = 52
View Source
const XIWarpPointerOpcode = 41

Variables

This section is empty.

Functions

func CloseDevice

func CloseDevice(conn *x.Conn, deviceId uint8)

func CloseDeviceChecked

func CloseDeviceChecked(conn *x.Conn, deviceId uint8) x.VoidCookie

func Ext

func Ext() *x.Extension

func SelectExtensionEvent

func SelectExtensionEvent(conn *x.Conn, window x.Window, classes []EventClass)

func SelectExtensionEventChecked

func SelectExtensionEventChecked(conn *x.Conn, window x.Window, classes []EventClass) x.VoidCookie

func XIAllowEvents

func XIAllowEvents(conn *x.Conn, time x.Timestamp, deviceId DeviceId, eventMode uint8, touchId uint32, grabWindow x.Window)

func XIAllowEventsChecked

func XIAllowEventsChecked(conn *x.Conn, time x.Timestamp, deviceId DeviceId, eventMode uint8, touchId uint32, grabWindow x.Window) x.VoidCookie

func XIChangeCursor

func XIChangeCursor(conn *x.Conn, window x.Window, cursor x.Cursor, deviceId DeviceId)

func XIChangeCursorChecked

func XIChangeCursorChecked(conn *x.Conn, window x.Window, cursor x.Cursor, deviceId DeviceId) x.VoidCookie

func XIChangeHierarchy

func XIChangeHierarchy(conn *x.Conn, changes []HierarchyChange)

func XIChangeHierarchyChecked

func XIChangeHierarchyChecked(conn *x.Conn, changes []HierarchyChange) x.VoidCookie

func XIChangeProperty

func XIChangeProperty(conn *x.Conn, deviceId DeviceId, mode uint8, format uint8, property x.Atom, Type x.Atom, data []byte)

func XIChangePropertyChecked

func XIChangePropertyChecked(conn *x.Conn, deviceId DeviceId, mode uint8, format uint8, property x.Atom, Type x.Atom, data []byte) x.VoidCookie

func XIDeleteProperty

func XIDeleteProperty(conn *x.Conn, deviceId DeviceId, property x.Atom)

func XIDeletePropertyChecked

func XIDeletePropertyChecked(conn *x.Conn, deviceId DeviceId, property x.Atom) x.VoidCookie

func XIPassiveUngrabDevice

func XIPassiveUngrabDevice(conn *x.Conn, grabWindow x.Window, detail uint32, deviceId DeviceId, grabType uint8, modifiers []uint32)

func XIPassiveUngrabDeviceChecked

func XIPassiveUngrabDeviceChecked(conn *x.Conn, grabWindow x.Window, detail uint32, deviceId DeviceId, grabType uint8, modifiers []uint32) x.VoidCookie

func XISelectEvents

func XISelectEvents(conn *x.Conn, window x.Window, masks []EventMask)

func XISelectEventsChecked

func XISelectEventsChecked(conn *x.Conn, window x.Window, masks []EventMask) x.VoidCookie

func XISetClientPointer

func XISetClientPointer(conn *x.Conn, window x.Window, deviceId DeviceId)

func XISetClientPointerChecked

func XISetClientPointerChecked(conn *x.Conn, window x.Window, deviceId DeviceId) x.VoidCookie

func XISetFocus

func XISetFocus(conn *x.Conn, focus x.Window, time x.Timestamp, deviceId DeviceId)

func XISetFocusChecked

func XISetFocusChecked(conn *x.Conn, focus x.Window, time x.Timestamp, deviceId DeviceId) x.VoidCookie

func XIUngrabDevice

func XIUngrabDevice(conn *x.Conn, time x.Timestamp, deviceId DeviceId)

func XIUngrabDeviceChecked

func XIUngrabDeviceChecked(conn *x.Conn, time x.Timestamp, deviceId DeviceId) x.VoidCookie

func XIWarpPointer

func XIWarpPointer(conn *x.Conn, srcWin, dstWin x.Window, srcX, srcY float32, srcWidth, srcHeight uint16, dstX, dstY float32, deviceId DeviceId)

func XIWarpPointerChecked

func XIWarpPointerChecked(conn *x.Conn, srcWin, dstWin x.Window, srcX, srcY float32, srcWidth, srcHeight uint16, dstX, dstY float32, deviceId DeviceId) x.VoidCookie

Types

type AddMaster

type AddMaster struct {
	SendCore bool
	Enable   bool
	Name     string
}

size (1 + (len(Name) + pad(len(name))) / 4) * 4 byte

type AttachSlave

type AttachSlave struct {
	DeviceId DeviceId
	Master   DeviceId
}

size 1 * 4 byte

type BarrierEvent

type BarrierEvent struct {
	EventHeader
	EventId  uint32
	Root     x.Window
	Event    x.Window
	Barrier  xfixes.Barrier
	DTime    uint32
	Flags    uint32
	SourceId DeviceId
	RootX    float32
	RootY    float32
	DX       float64
	DY       float64
}

ge event

type BarrierHitEvent

type BarrierHitEvent struct {
	BarrierEvent
}

func NewBarrierHitEvent

func NewBarrierHitEvent(data []byte) (*BarrierHitEvent, error)

type BarrierLeaveEvent

type BarrierLeaveEvent struct {
	BarrierHitEvent
}

func NewBarrierLeaveEvent

func NewBarrierLeaveEvent(data []byte) (*BarrierLeaveEvent, error)

type ButtonClass

type ButtonClass struct {
	SourceId   DeviceId
	NumButtons uint16
	State      []uint32
	Labels     []x.Atom
}

func (*ButtonClass) GetDeviceClassType

func (*ButtonClass) GetDeviceClassType() uint16

func (*ButtonClass) GetSourceId

func (bc *ButtonClass) GetSourceId() DeviceId

type ButtonPressEvent

type ButtonPressEvent struct {
	DeviceEvent
}

func NewButtonPressEvent

func NewButtonPressEvent(data []byte) (*ButtonPressEvent, error)

type ButtonReleaseEvent

type ButtonReleaseEvent struct {
	DeviceEvent
}

func NewButtonReleaseEvent

func NewButtonReleaseEvent(data []byte) (*ButtonReleaseEvent, error)

type ChangeDeviceControlCookie

type ChangeDeviceControlCookie x.SeqNum

type ChangeDeviceNotifyEvent

type ChangeDeviceNotifyEvent struct {
	DeviceId uint8
	Sequence uint16
	Time     x.Timestamp
	Request  uint8
}

func NewChangeDeviceNotifyEvent

func NewChangeDeviceNotifyEvent(data []byte) (*ChangeDeviceNotifyEvent, error)

type ChangeKeyboardDeviceCookie

type ChangeKeyboardDeviceCookie x.SeqNum

type ChangePointerDeviceCookie

type ChangePointerDeviceCookie x.SeqNum

type ClassInfo

type ClassInfo struct {
	ClassId       uint8
	EventTypeBase uint8
}

size: 2b

type DetachSlave

type DetachSlave struct {
	DeviceId DeviceId
}

size 1 * 4 byte

type DeviceButtonPressEvent

type DeviceButtonPressEvent struct {
	DeviceKeyEvent
}

func NewDeviceButtonPressEvent

func NewDeviceButtonPressEvent(data []byte) (*DeviceButtonPressEvent, error)

type DeviceButtonReleaseEvent

type DeviceButtonReleaseEvent struct {
	DeviceKeyEvent
}

func NewDeviceButtonReleaseEvent

func NewDeviceButtonReleaseEvent(data []byte) (*DeviceButtonReleaseEvent, error)

type DeviceButtonStateNotifyEvent

type DeviceButtonStateNotifyEvent struct {
	DeviceId uint8
	Sequence uint16
	Buttons  []uint8 // len: 28
}

func NewDeviceButtonStateNotifyEvent

func NewDeviceButtonStateNotifyEvent(data []byte) (*DeviceButtonStateNotifyEvent, error)

type DeviceChangedEvent

type DeviceChangedEvent struct {
	EventHeader
	SourceId DeviceId
	Reason   uint8
	Classes  []DeviceClass
}

func NewDeviceChangedEvent

func NewDeviceChangedEvent(data []byte) (*DeviceChangedEvent, error)

type DeviceClass

type DeviceClass interface {
	GetDeviceClassType() uint16
	GetSourceId() DeviceId
}

type DeviceEvent

type DeviceEvent struct {
	EventHeader
	Detail       uint32
	Root         x.Window
	Event        x.Window
	Child        x.Window
	RootX        float32
	RootY        float32
	EventX       float32
	EventY       float32
	SourceId     DeviceId
	Flags        uint32
	Mods         ModifierInfo
	Group        GroupInfo
	ButtonMask   []uint32
	ValuatorMask []uint32
	AxisValues   []float32
}

ge event

type DeviceFocusEvent

type DeviceFocusEvent struct {
	Detail   uint8
	Sequence uint16
	Time     x.Timestamp
	Window   x.Window
	Mode     uint8
	DeviceId uint8
}

type DeviceFocusInEvent

type DeviceFocusInEvent struct {
	DeviceFocusEvent
}

func NewDeviceFocusInEvent

func NewDeviceFocusInEvent(data []byte) (*DeviceFocusInEvent, error)

type DeviceFocusOutEvent

type DeviceFocusOutEvent struct {
	DeviceFocusEvent
}

func NewDeviceFocusOutEvent

func NewDeviceFocusOutEvent(data []byte) (*DeviceFocusOutEvent, error)

type DeviceId

type DeviceId uint16

simple ('xcb', 'Input', 'DeviceId')

type DeviceKeyEvent

type DeviceKeyEvent struct {
	Detail     uint8
	Sequence   uint16
	Time       x.Timestamp
	Root       x.Window
	Event      x.Window
	Child      x.Window
	RootX      int16
	RootY      int16
	EventX     int16
	EventY     int16
	State      uint16
	SameScreen bool
	DeviceId   uint8
}

type DeviceKeyPressEvent

type DeviceKeyPressEvent struct {
	DeviceKeyEvent
}

func NewDeviceKeyPressEvent

func NewDeviceKeyPressEvent(data []byte) (*DeviceKeyPressEvent, error)

type DeviceKeyReleaseEvent

type DeviceKeyReleaseEvent struct {
	DeviceKeyEvent
}

func NewDeviceKeyReleaseEvent

func NewDeviceKeyReleaseEvent(data []byte) (*DeviceKeyReleaseEvent, error)

type DeviceKeyStateNotifyEvent

type DeviceKeyStateNotifyEvent struct {
	DeviceId uint8
	Sequence uint16
	Keys     []uint8 // len: 28
}

func NewDeviceKeyStateNotifyEvent

func NewDeviceKeyStateNotifyEvent(data []byte) (*DeviceKeyStateNotifyEvent, error)

type DeviceMappingNotifyEvent

type DeviceMappingNotifyEvent struct {
	DeviceId     uint8
	Sequence     uint16
	Request      uint8
	FirstKeycode x.Keycode
	Count        uint8
	Time         x.Timestamp
}

func NewDeviceMappingNotifyEvent

func NewDeviceMappingNotifyEvent(data []byte) (*DeviceMappingNotifyEvent, error)

type DeviceMotionNotifyEvent

type DeviceMotionNotifyEvent struct {
	DeviceKeyEvent
}

func NewDeviceMotionNotifyEvent

func NewDeviceMotionNotifyEvent(data []byte) (*DeviceMotionNotifyEvent, error)

type DevicePresenceNotifyEvent

type DevicePresenceNotifyEvent struct {
	Sequence  uint16
	Time      x.Timestamp
	DevChange uint8
	DeviceId  uint8
	Control   uint16
}

func NewDevicePresenceNotifyEvent

func NewDevicePresenceNotifyEvent(data []byte) (*DevicePresenceNotifyEvent, error)

type DevicePropertyNotifyEvent

type DevicePropertyNotifyEvent struct {
	State    uint8
	Sequence uint16
	Time     x.Timestamp
	Property x.Atom
	DeviceId uint8
}

func NewDevicePropertyNotifyEvent

func NewDevicePropertyNotifyEvent(data []byte) (*DevicePropertyNotifyEvent, error)

type DeviceStateNotifyEvent

type DeviceStateNotifyEvent struct {
	DeviceId        uint8
	Sequence        uint16
	Time            x.Timestamp
	NumKeys         uint8
	NumButtons      uint8
	NumValuators    uint8
	ClassesReported uint8
	Buttons         []uint8  // len 4
	Keys            []uint8  // len 4
	Valuators       []uint32 // len 3
}

func NewDeviceStateNotifyEvent

func NewDeviceStateNotifyEvent(data []byte) (*DeviceStateNotifyEvent, error)

type DeviceValuatorEvent

type DeviceValuatorEvent struct {
	DeviceId      uint8
	Sequence      uint16
	DeviceState   uint16
	FirstValuator uint8
	Valuators     []int32
}

func NewDeviceValuatorEvent

func NewDeviceValuatorEvent(data []byte) (*DeviceValuatorEvent, error)

type EnterEvent

type EnterEvent struct {
	EnterLeaveEvent
}

func NewEnterEvent

func NewEnterEvent(data []byte) (*EnterEvent, error)

type EnterLeaveEvent

type EnterLeaveEvent struct {
	EventHeader
	SourceId   DeviceId
	Mode       uint8
	Detail     uint8
	Root       x.Window
	Event      x.Window
	Child      x.Window
	RootX      float32
	RootY      float32
	EventX     float32
	EventY     float32
	SameScreen bool
	Focus      bool
	Mods       ModifierInfo
	Group      GroupInfo
	Buttons    []uint32
}

ge event

type EventClass

type EventClass uint32

simple ('xcb', 'Input', 'EventClass')

func FindTypeAndClass

func FindTypeAndClass(deviceId uint8, classInfos []ClassInfo,
	classId uint8, eventCode uint8) (Type uint8, class EventClass)

type EventHeader

type EventHeader struct {
	DeviceId DeviceId
	Time     x.Timestamp
}

type EventMask

type EventMask struct {
	DeviceId DeviceId
	Mask     []uint32
}

type EventTypeBase

type EventTypeBase uint8

simple ('xcb', 'Input', 'EventTypeBase')

type FocusInEvent

type FocusInEvent struct {
	EnterLeaveEvent
}

func NewFocusInEvent

func NewFocusInEvent(data []byte) (*FocusInEvent, error)

type FocusOutEvent

type FocusOutEvent struct {
	EnterLeaveEvent
}

func NewFocusOutEvent

func NewFocusOutEvent(data []byte) (*FocusOutEvent, error)

type Fp1616

type Fp1616 int32

simple ('xcb', 'Input', 'FP1616')

type GenericDeviceClass

type GenericDeviceClass struct {
	Type     uint16
	Len      uint16
	SourceId DeviceId
	Data     []byte
}

func (*GenericDeviceClass) GetDeviceClassType

func (dc *GenericDeviceClass) GetDeviceClassType() uint16

func (*GenericDeviceClass) GetSourceId

func (dc *GenericDeviceClass) GetSourceId() DeviceId

type GetDeviceButtonMappingCookie

type GetDeviceButtonMappingCookie x.SeqNum

type GetDeviceControlCookie

type GetDeviceControlCookie x.SeqNum

type GetDeviceDontPropagateListCookie

type GetDeviceDontPropagateListCookie x.SeqNum

type GetDeviceFocusCookie

type GetDeviceFocusCookie x.SeqNum

type GetDeviceKeyMappingCookie

type GetDeviceKeyMappingCookie x.SeqNum

type GetDeviceModifierMappingCookie

type GetDeviceModifierMappingCookie x.SeqNum

type GetDeviceMotionEventsCookie

type GetDeviceMotionEventsCookie x.SeqNum

type GetDevicePropertyCookie

type GetDevicePropertyCookie x.SeqNum

type GetExtensionVersionCookie

type GetExtensionVersionCookie x.SeqNum

type GetFeedbackControlCookie

type GetFeedbackControlCookie x.SeqNum

type GetSelectedExtensionEventsCookie

type GetSelectedExtensionEventsCookie x.SeqNum

type GrabDeviceCookie

type GrabDeviceCookie x.SeqNum

type GrabModifierInfo

type GrabModifierInfo struct {
	Modifiers uint32
	Status    uint8
}

size: 2 * 4b

type GroupInfo

type GroupInfo struct {
	Base      uint8
	Latched   uint8
	Locked    uint8
	Effective uint8
}

size: 1 * 4b

type HierarchyChange

type HierarchyChange interface {
	// contains filtered or unexported methods
}

type HierarchyEvent

type HierarchyEvent struct {
	EventHeader
	Flags uint32
	Infos []HierarchyInfo
}

ge event

func NewHierarchyEvent

func NewHierarchyEvent(data []byte) (*HierarchyEvent, error)

type HierarchyInfo

type HierarchyInfo struct {
	DeviceId   DeviceId
	Attachment DeviceId
	Type       uint8
	Enabled    bool
	Flags      uint32
}

size: 3 * 4b

type KeyClass

type KeyClass struct {
	SourceId DeviceId
	NumKeys  uint16
	Keys     []uint32
}

func (*KeyClass) GetDeviceClassType

func (*KeyClass) GetDeviceClassType() uint16

func (*KeyClass) GetSourceId

func (kc *KeyClass) GetSourceId() DeviceId

type KeyCode

type KeyCode uint8

simple ('xcb', 'Input', 'KeyCode')

type KeyPressEvent

type KeyPressEvent struct {
	DeviceEvent
}

func NewKeyPressEvent

func NewKeyPressEvent(data []byte) (*KeyPressEvent, error)

type KeyReleaseEvent

type KeyReleaseEvent struct {
	DeviceEvent
}

func NewKeyReleaseEvent

func NewKeyReleaseEvent(data []byte) (*KeyReleaseEvent, error)

type LeaveEvent

type LeaveEvent struct {
	EnterLeaveEvent
}

func NewLeaveEvent

func NewLeaveEvent(data []byte) (*LeaveEvent, error)

type ListDevicePropertiesCookie

type ListDevicePropertiesCookie x.SeqNum

type ListInputDevicesCookie

type ListInputDevicesCookie x.SeqNum

type ModifierInfo

type ModifierInfo struct {
	Base      uint32
	Latched   uint32
	Locked    uint32
	Effective uint32
}

size: 4 * 4b

type MotionEvent

type MotionEvent struct {
	DeviceEvent
}

func NewMotionEvent

func NewMotionEvent(data []byte) (*MotionEvent, error)

type OpenDeviceCookie

type OpenDeviceCookie x.SeqNum

func OpenDevice

func OpenDevice(conn *x.Conn, deviceId uint8) OpenDeviceCookie

func (OpenDeviceCookie) Reply

func (cookie OpenDeviceCookie) Reply(conn *x.Conn) (*OpenDeviceReply, error)

type OpenDeviceReply

type OpenDeviceReply struct {
	XIReplyType uint8
	ClassInfos  []ClassInfo
}

type PropertyEvent

type PropertyEvent struct {
	EventHeader
	Property x.Atom
	What     uint8
}

ge event

func NewPropertyEvent

func NewPropertyEvent(data []byte) (*PropertyEvent, error)

type ProximityInEvent

type ProximityInEvent struct {
	DeviceKeyEvent
}

func NewProximityInEvent

func NewProximityInEvent(data []byte) (*ProximityInEvent, error)

type ProximityOutEvent

type ProximityOutEvent struct {
	DeviceKeyEvent
}

func NewProximityOutEvent

func NewProximityOutEvent(data []byte) (*ProximityOutEvent, error)

type QueryDeviceStateCookie

type QueryDeviceStateCookie x.SeqNum

type RawButtonPressEvent

type RawButtonPressEvent struct {
	RawEvent
}

func NewRawButtonPressEvent

func NewRawButtonPressEvent(data []byte) (*RawButtonPressEvent, error)

type RawButtonReleaseEvent

type RawButtonReleaseEvent struct {
	RawEvent
}

func NewRawButtonReleaseEvent

func NewRawButtonReleaseEvent(data []byte) (*RawButtonReleaseEvent, error)

type RawEvent

type RawEvent struct {
	EventHeader
	Detail        uint32
	SourceId      DeviceId
	Flags         uint32
	ValuatorMask  []uint32
	AxisValues    []float32
	AxisValuesRaw []float32
}

ge event

type RawKeyPressEvent

type RawKeyPressEvent struct {
	RawEvent
}

func NewRawKeyPressEvent

func NewRawKeyPressEvent(data []byte) (*RawKeyPressEvent, error)

type RawKeyReleaseEvent

type RawKeyReleaseEvent struct {
	RawEvent
}

func NewRawKeyReleaseEvent

func NewRawKeyReleaseEvent(data []byte) (*RawKeyReleaseEvent, error)

type RawMotionEvent

type RawMotionEvent struct {
	RawEvent
}

func NewRawMotionEvent

func NewRawMotionEvent(data []byte) (*RawMotionEvent, error)

type RawTouchBeginEvent

type RawTouchBeginEvent struct {
	RawEvent
}

func NewRawTouchBeginEvent

func NewRawTouchBeginEvent(data []byte) (*RawTouchBeginEvent, error)

type RawTouchEndEvent

type RawTouchEndEvent struct {
	RawEvent
}

func NewRawTouchEndEvent

func NewRawTouchEndEvent(data []byte) (*RawTouchEndEvent, error)

type RawTouchUpdateEvent

type RawTouchUpdateEvent struct {
	RawEvent
}

func NewRawTouchUpdateEvent

func NewRawTouchUpdateEvent(data []byte) (*RawTouchUpdateEvent, error)

type RemoveMaster

type RemoveMaster struct {
	DeviceId       DeviceId
	ReturnMode     uint8
	ReturnPointer  DeviceId
	ReturnKeyboard DeviceId
}

size 2 * 4byte

type ScrollClass

type ScrollClass struct {
	SourceId   DeviceId
	Number     uint16
	ScrollType uint16
	Flags      uint32
	Increment  float64
}

func (*ScrollClass) GetDeviceClassType

func (*ScrollClass) GetDeviceClassType() uint16

func (*ScrollClass) GetSourceId

func (sc *ScrollClass) GetSourceId() DeviceId

type SetDeviceButtonMappingCookie

type SetDeviceButtonMappingCookie x.SeqNum

type SetDeviceModeCookie

type SetDeviceModeCookie x.SeqNum

type SetDeviceModifierMappingCookie

type SetDeviceModifierMappingCookie x.SeqNum

type SetDeviceValuatorsCookie

type SetDeviceValuatorsCookie x.SeqNum

type TouchBeginEvent

type TouchBeginEvent struct {
	DeviceEvent
}

func NewTouchBeginEvent

func NewTouchBeginEvent(data []byte) (*TouchBeginEvent, error)

type TouchClass

type TouchClass struct {
	SourceId   DeviceId
	Mode       uint8
	NumTouches uint8
}

func (*TouchClass) GetDeviceClassType

func (*TouchClass) GetDeviceClassType() uint16

func (*TouchClass) GetSourceId

func (tc *TouchClass) GetSourceId() DeviceId

type TouchEndEvent

type TouchEndEvent struct {
	DeviceEvent
}

func NewTouchEndEvent

func NewTouchEndEvent(data []byte) (*TouchEndEvent, error)

type TouchOwnershipEvent

type TouchOwnershipEvent struct {
	EventHeader
	TouchId  uint32
	Root     x.Window
	Event    x.Window
	Child    x.Window
	SourceId DeviceId
	Flags    uint32
}

func NewTouchOwnershipEvent

func NewTouchOwnershipEvent(data []byte) (*TouchOwnershipEvent, error)

type TouchUpdateEvent

type TouchUpdateEvent struct {
	DeviceEvent
}

func NewTouchUpdateEvent

func NewTouchUpdateEvent(data []byte) (*TouchUpdateEvent, error)

type ValuatorClass

type ValuatorClass struct {
	SourceId   DeviceId
	Number     uint16
	Label      x.Atom
	Min        float64
	Max        float64
	Value      float64
	Resolution uint32
	Mode       uint8
}

also called AxisClass

func (*ValuatorClass) GetDeviceClassType

func (*ValuatorClass) GetDeviceClassType() uint16

func (*ValuatorClass) GetSourceId

func (vc *ValuatorClass) GetSourceId() DeviceId

type XIDeviceInfo

type XIDeviceInfo struct {
	Id         DeviceId
	Type       uint16
	Attachment DeviceId
	Enabled    bool
	Name       string
	Classes    []DeviceClass
}

type XIGetClientPointerCookie

type XIGetClientPointerCookie x.SeqNum

func XIGetClientPointer

func XIGetClientPointer(conn *x.Conn, window x.Window) XIGetClientPointerCookie

func (XIGetClientPointerCookie) Reply

type XIGetClientPointerReply

type XIGetClientPointerReply struct {
	Set      bool
	DeviceId DeviceId
}

type XIGetFocusCookie

type XIGetFocusCookie x.SeqNum

func XIGetFocus

func XIGetFocus(conn *x.Conn, deviceId DeviceId) XIGetFocusCookie

func (XIGetFocusCookie) Reply

func (cookie XIGetFocusCookie) Reply(conn *x.Conn) (*XIGetFocusReply, error)

type XIGetFocusReply

type XIGetFocusReply struct {
	Focus x.Window
}

type XIGetPropertyCookie

type XIGetPropertyCookie x.SeqNum

func XIGetProperty

func XIGetProperty(conn *x.Conn, deviceId DeviceId, delete bool, property x.Atom, Type x.Atom, offset, len uint32) XIGetPropertyCookie

func (XIGetPropertyCookie) Reply

func (cookie XIGetPropertyCookie) Reply(conn *x.Conn) (*XIGetPropertyReply, error)

type XIGetPropertyReply

type XIGetPropertyReply struct {
	Type       x.Atom
	BytesAfter uint32
	NumItems   uint32
	Format     uint8
	Data       []byte
}

type XIGetSelectedEventsCookie

type XIGetSelectedEventsCookie x.SeqNum

func XIGetSelectedEvents

func XIGetSelectedEvents(conn *x.Conn, window x.Window) XIGetSelectedEventsCookie

func (XIGetSelectedEventsCookie) Reply

type XIGetSelectedEventsReply

type XIGetSelectedEventsReply struct {
	Masks []EventMask
}

type XIGrabDeviceCookie

type XIGrabDeviceCookie x.SeqNum

func XIGrabDevice

func XIGrabDevice(conn *x.Conn, window x.Window, time x.Timestamp, cursor x.Cursor, deviceId DeviceId, mode, pairedDeviceMode uint8, ownerEvents bool, masks []EventMask) XIGrabDeviceCookie

func (XIGrabDeviceCookie) Reply

func (cookie XIGrabDeviceCookie) Reply(conn *x.Conn) (*XIGrabDeviceReply, error)

type XIGrabDeviceReply

type XIGrabDeviceReply struct {
	Status uint8
}

type XIListPropertiesCookie

type XIListPropertiesCookie x.SeqNum

func XIListProperties

func XIListProperties(conn *x.Conn, deviceId DeviceId) XIListPropertiesCookie

func (XIListPropertiesCookie) Reply

func (cookie XIListPropertiesCookie) Reply(conn *x.Conn) (*XIListPropertiesReply, error)

type XIListPropertiesReply

type XIListPropertiesReply struct {
	Properties []x.Atom
}

type XIPassiveGrabDeviceCookie

type XIPassiveGrabDeviceCookie x.SeqNum

func XIPassiveGrabDevice

func XIPassiveGrabDevice(conn *x.Conn, grabWindow x.Window, cursor x.Cursor, detail uint32, deviceId DeviceId, grabType, grabMode, pairedDeviceMode uint8, ownerEvents bool, masks []uint32, modifiers []uint32) XIPassiveGrabDeviceCookie

func (XIPassiveGrabDeviceCookie) Reply

type XIPassiveGrabDeviceReply

type XIPassiveGrabDeviceReply struct {
	Modifiers []GrabModifierInfo
}

type XIQueryDeviceCookie

type XIQueryDeviceCookie x.SeqNum

func XIQueryDevice

func XIQueryDevice(conn *x.Conn, deviceId DeviceId) XIQueryDeviceCookie

func (XIQueryDeviceCookie) Reply

func (cookie XIQueryDeviceCookie) Reply(conn *x.Conn) (*XIQueryDeviceReply, error)

type XIQueryDeviceReply

type XIQueryDeviceReply struct {
	Infos []XIDeviceInfo
}

type XIQueryPointerCookie

type XIQueryPointerCookie x.SeqNum

func XIQueryPointer

func XIQueryPointer(conn *x.Conn, window x.Window, deviceId DeviceId) XIQueryPointerCookie

func (XIQueryPointerCookie) Reply

func (cookie XIQueryPointerCookie) Reply(conn *x.Conn) (*XIQueryPointerReply, error)

type XIQueryPointerReply

type XIQueryPointerReply struct {
	Root       x.Window
	Child      x.Window
	RootX      float32
	RootY      float32
	WinX       float32
	WinY       float32
	SameScreen bool
	Buttons    []uint32
	Mods       ModifierInfo
	Group      GroupInfo
}

type XIQueryVersionCookie

type XIQueryVersionCookie x.SeqNum

func XIQueryVersion

func XIQueryVersion(conn *x.Conn, majorVersion, minorVersion uint16) XIQueryVersionCookie

func (XIQueryVersionCookie) Reply

func (cookie XIQueryVersionCookie) Reply(conn *x.Conn) (*XIQueryVersionReply, error)

type XIQueryVersionReply

type XIQueryVersionReply struct {
	MajorVersion uint16
	MinorVersion uint16
}

Jump to

Keyboard shortcuts

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