x11

package
v0.0.0-...-af996ba Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyPressMask = 1 << iota
	KeyReleaseMask
	ButtonPressMask
	ButtonReleaseMask
	EnterWindowMask
	LeaveWindowMask
	PointerMotionMask
	PointerMotionHintMask
	Button1MotionMask
	Button2MotionMask
	Button3MotionMask
	Button4MotionMask
	Button5MotionMask
	ButtonMotionMask
	KeymapStateMask
	ExposureMask
	VisibilityChangeMask
	StructureNotifyMask
	ResizeRedirectMask
	SubstructureNotifyMask
	SubstructureRedirectMask
	FocusChangeMask
	PropertyChangeMask
	ColormapChangeMask
	OwnerGrabButtonMask
	NoEventMask = 0
)
View Source
const (
	KeyPressType = 2 + iota
	KeyReleaseType
	ButtonPressType
	ButtonReleaseType
	MotionNotifyType
	EnterNotifyType
	LeaveNotifyType
	FocusInType
	FocusOutType
	KeymapNotifyType
	ExposeType
	GraphicsExposeType
	NoExposeType
	VisibilityNotifyType
	CreateNotifyType
	DestroyNotifyType
	UnmapNotifyType
	MapNotifyType
	MapRequestType
	ReparentNotifyType
	ConfigureNotifyType
	ConfigureRequestType
	GravityNotifyType
	ResizeRequestType
	CirculateNotifyType
	CirculateRequestType
	PropertyNotifyType
	SelectionClearType
	SelectionRequestType
	SelectionNotifyType
	ColormapNotifyType
	ClientMessageType
	MappingNotifyType
	GenericEventType
	LASTEventType
)
View Source
const (
	PropModeReplace = iota
	PropModePrepend
	PropModeAppend
)
View Source
const (
	CWBackPixmap = 1 << iota
	CWBackPixel
	CWBorderPixmap
	CWBorderPixel
	CWBitGravity
	CWWinGravity
	CWBackingStore
	CWBackingPlanes
	CWBackingPixel
	CWOverrideRedirect
	CWSaveUnder
	CWEventMask
	CWDontPropagate
	CWColormap
	CWCursor
)

Variables

This section is empty.

Functions

func ClipboardChangeCount

func ClipboardChangeCount() int

func ClipboardClear

func ClipboardClear()

func ClipboardTypes

func ClipboardTypes() []string

func CloseDisplay

func CloseDisplay()

func DefaultScreen

func DefaultScreen() int

func Flush

func Flush()

func GetClipboard

func GetClipboard(dataType string) []byte

func Modifiers

func Modifiers(state C.uint) keys.Modifiers

func OpenDisplay

func OpenDisplay()

func ProcessSelectionClearEvent

func ProcessSelectionClearEvent(evt *SelectionClearEvent)

func ProcessSelectionRequestEvent

func ProcessSelectionRequestEvent(evt *SelectionRequestEvent)

func Running

func Running() bool

func SetClipboard

func SetClipboard(data []datatypes.Data)

Types

type Atom

type Atom C.Atom
var (
	WindowStateAtom Atom

	WindowStateMaximizedHAtom Atom
	WindowStateMaximizedVAtom Atom
	ProtocolsSubType          Atom
	TaskSubType               Atom
	DeleteWindowSubType       Atom
)

func InternAtom

func InternAtom(name string) Atom

func (Atom) Name

func (atom Atom) Name() string

type ButtonEvent

type ButtonEvent C.XButtonEvent

func (*ButtonEvent) Button

func (evt *ButtonEvent) Button() int

func (*ButtonEvent) IsScrollWheel

func (evt *ButtonEvent) IsScrollWheel() bool

func (*ButtonEvent) Modifiers

func (evt *ButtonEvent) Modifiers() keys.Modifiers

func (*ButtonEvent) ScrollWheelDirection

func (evt *ButtonEvent) ScrollWheelDirection() geom.Point

func (*ButtonEvent) ToEvent

func (evt *ButtonEvent) ToEvent() *Event

func (*ButtonEvent) When

func (evt *ButtonEvent) When() C.Time

func (*ButtonEvent) Where

func (evt *ButtonEvent) Where() geom.Point

func (*ButtonEvent) Window

func (evt *ButtonEvent) Window() Window

type ClientMessageEvent

type ClientMessageEvent C.XClientMessageEvent

func NewClientMessageEvent

func NewClientMessageEvent(wnd Window, subType Atom, format int) *ClientMessageEvent

func (*ClientMessageEvent) Format

func (evt *ClientMessageEvent) Format() int

func (*ClientMessageEvent) Protocol

func (evt *ClientMessageEvent) Protocol() Atom

func (*ClientMessageEvent) SubType

func (evt *ClientMessageEvent) SubType() Atom

func (*ClientMessageEvent) TaskID

func (evt *ClientMessageEvent) TaskID() uint64

func (*ClientMessageEvent) ToEvent

func (evt *ClientMessageEvent) ToEvent() *Event

func (*ClientMessageEvent) Window

func (evt *ClientMessageEvent) Window() Window

type ConfigureEvent

type ConfigureEvent C.XConfigureEvent

func (*ConfigureEvent) ToEvent

func (evt *ConfigureEvent) ToEvent() *Event

func (*ConfigureEvent) Window

func (evt *ConfigureEvent) Window() Window

type CrossingEvent

type CrossingEvent C.XCrossingEvent

func (*CrossingEvent) Modifiers

func (evt *CrossingEvent) Modifiers() keys.Modifiers

func (*CrossingEvent) ToEvent

func (evt *CrossingEvent) ToEvent() *Event

func (*CrossingEvent) Where

func (evt *CrossingEvent) Where() geom.Point

func (*CrossingEvent) Window

func (evt *CrossingEvent) Window() Window

type Cursor

type Cursor C.Cursor

func NewCursor

func NewCursor(imgData *draw.ImageData, hotSpot geom.Point) Cursor

func SystemCursor

func SystemCursor(id SystemCursorID) Cursor

func (Cursor) Dispose

func (cursor Cursor) Dispose()

type DestroyWindowEvent

type DestroyWindowEvent C.XDestroyWindowEvent

func (*DestroyWindowEvent) ToEvent

func (evt *DestroyWindowEvent) ToEvent() *Event

func (*DestroyWindowEvent) Window

func (evt *DestroyWindowEvent) Window() Window

type Event

type Event C.XEvent

func NextEvent

func NextEvent() *Event

func (*Event) ToButtonEvent

func (evt *Event) ToButtonEvent() *ButtonEvent

func (*Event) ToClientMessageEvent

func (evt *Event) ToClientMessageEvent() *ClientMessageEvent

func (*Event) ToConfigureEvent

func (evt *Event) ToConfigureEvent() *ConfigureEvent

func (*Event) ToCrossingEvent

func (evt *Event) ToCrossingEvent() *CrossingEvent

func (*Event) ToDestroyWindowEvent

func (evt *Event) ToDestroyWindowEvent() *DestroyWindowEvent

func (*Event) ToEvent

func (evt *Event) ToEvent() *Event

func (*Event) ToExposeEvent

func (evt *Event) ToExposeEvent() *ExposeEvent

func (*Event) ToFocusChangeEvent

func (evt *Event) ToFocusChangeEvent() *FocusChangeEvent

func (*Event) ToKeyEvent

func (evt *Event) ToKeyEvent() *KeyEvent

func (*Event) ToMapWindowEvent

func (evt *Event) ToMapWindowEvent() *MapWindowEvent

func (*Event) ToMotionEvent

func (evt *Event) ToMotionEvent() *MotionEvent

func (*Event) ToPropertyEvent

func (evt *Event) ToPropertyEvent() *PropertyEvent

func (*Event) ToSelectionClearEvent

func (evt *Event) ToSelectionClearEvent() *SelectionClearEvent

func (*Event) ToSelectionEvent

func (evt *Event) ToSelectionEvent() *SelectionEvent

func (*Event) ToSelectionRequestEvent

func (evt *Event) ToSelectionRequestEvent() *SelectionRequestEvent

func (*Event) Type

func (evt *Event) Type() int

func (*Event) Window

func (evt *Event) Window() Window

type Eventable

type Eventable interface {
	ToEvent() *Event
}

type ExposeEvent

type ExposeEvent C.XExposeEvent

func NewExposeEvent

func NewExposeEvent(wnd Window, bounds geom.Rect) *ExposeEvent

func (*ExposeEvent) Bounds

func (evt *ExposeEvent) Bounds() geom.Rect

func (*ExposeEvent) ToEvent

func (evt *ExposeEvent) ToEvent() *Event

func (*ExposeEvent) Window

func (evt *ExposeEvent) Window() Window

type FocusChangeEvent

type FocusChangeEvent C.XFocusChangeEvent

func (*FocusChangeEvent) ToEvent

func (evt *FocusChangeEvent) ToEvent() *Event

func (*FocusChangeEvent) Window

func (evt *FocusChangeEvent) Window() Window

type KeyEvent

type KeyEvent C.XKeyEvent

func (*KeyEvent) CodeAndChar

func (evt *KeyEvent) CodeAndChar() (code int, ch rune)

func (*KeyEvent) Modifiers

func (evt *KeyEvent) Modifiers() keys.Modifiers

func (*KeyEvent) ToEvent

func (evt *KeyEvent) ToEvent() *Event

func (*KeyEvent) When

func (evt *KeyEvent) When() C.Time

func (*KeyEvent) Window

func (evt *KeyEvent) Window() Window

type MapWindowEvent

type MapWindowEvent C.XMapEvent

func (*MapWindowEvent) ToEvent

func (evt *MapWindowEvent) ToEvent() *Event

func (*MapWindowEvent) Window

func (evt *MapWindowEvent) Window() Window

type MotionEvent

type MotionEvent C.XMotionEvent

func (*MotionEvent) Modifiers

func (evt *MotionEvent) Modifiers() keys.Modifiers

func (*MotionEvent) ToEvent

func (evt *MotionEvent) ToEvent() *Event

func (*MotionEvent) Where

func (evt *MotionEvent) Where() geom.Point

func (*MotionEvent) Window

func (evt *MotionEvent) Window() Window

type PropertyEvent

type PropertyEvent C.XPropertyEvent

func (*PropertyEvent) Time

func (evt *PropertyEvent) Time() C.Time

func (*PropertyEvent) ToEvent

func (evt *PropertyEvent) ToEvent() *Event

type SelectionClearEvent

type SelectionClearEvent C.XSelectionClearEvent

func (*SelectionClearEvent) Selection

func (evt *SelectionClearEvent) Selection() C.Atom

func (*SelectionClearEvent) ToEvent

func (evt *SelectionClearEvent) ToEvent() *Event

func (*SelectionClearEvent) When

func (evt *SelectionClearEvent) When() C.Time

func (*SelectionClearEvent) Window

func (evt *SelectionClearEvent) Window() Window

type SelectionEvent

type SelectionEvent C.XSelectionEvent

func (*SelectionEvent) Property

func (evt *SelectionEvent) Property() Atom

func (*SelectionEvent) Requestor

func (evt *SelectionEvent) Requestor() Window

func (*SelectionEvent) Selection

func (evt *SelectionEvent) Selection() Atom

func (*SelectionEvent) Target

func (evt *SelectionEvent) Target() Atom

func (*SelectionEvent) ToEvent

func (evt *SelectionEvent) ToEvent() *Event

func (*SelectionEvent) When

func (evt *SelectionEvent) When() C.Time

type SelectionRequestEvent

type SelectionRequestEvent C.XSelectionRequestEvent

func (*SelectionRequestEvent) NewNotify

func (evt *SelectionRequestEvent) NewNotify(bad bool) *SelectionEvent

func (*SelectionRequestEvent) Owner

func (evt *SelectionRequestEvent) Owner() Window

func (*SelectionRequestEvent) Property

func (evt *SelectionRequestEvent) Property() Atom

func (*SelectionRequestEvent) Requestor

func (evt *SelectionRequestEvent) Requestor() Window

func (*SelectionRequestEvent) Selection

func (evt *SelectionRequestEvent) Selection() Atom

func (*SelectionRequestEvent) Target

func (evt *SelectionRequestEvent) Target() Atom

func (*SelectionRequestEvent) ToEvent

func (evt *SelectionRequestEvent) ToEvent() *Event

func (*SelectionRequestEvent) When

func (evt *SelectionRequestEvent) When() C.Time

type SystemCursorID

type SystemCursorID int
const (
	ArrowID            SystemCursorID = C.XC_left_ptr
	TextID             SystemCursorID = C.XC_xterm
	VerticalTextID     SystemCursorID = -1
	CrossHairID        SystemCursorID = C.XC_crosshair
	ClosedHandID       SystemCursorID = -2
	OpenHandID         SystemCursorID = -3
	PointingHandID     SystemCursorID = -4
	ResizeLeftID       SystemCursorID = C.XC_left_side
	ResizeRightID      SystemCursorID = C.XC_right_side
	ResizeLeftRightID  SystemCursorID = -5
	ResizeUpID         SystemCursorID = C.XC_top_side
	ResizeDownID       SystemCursorID = C.XC_bottom_side
	ResizeUpDownID     SystemCursorID = C.XC_double_arrow
	DisappearingItemID SystemCursorID = -6
	NotAllowedID       SystemCursorID = -7
	DragLinkID         SystemCursorID = -8
	DragCopyID         SystemCursorID = -9
	ContextMenuID      SystemCursorID = -10
)

type Visual

type Visual C.Visual

func DefaultVisual

func DefaultVisual() *Visual

type Window

type Window C.Window

func DefaultRootWindow

func DefaultRootWindow() Window

func InputFocus

func InputFocus() Window

func NewPopupWindow

func NewPopupWindow(parent Window, bounds geom.Rect) Window

func NewWindow

func NewWindow(bounds geom.Rect) Window

func (Window) ChangeProperty

func (wnd Window) ChangeProperty(property Atom, propertyType Atom, format, mode int, data unsafe.Pointer, elements int)

func (Window) ContentFrame

func (wnd Window) ContentFrame() geom.Rect

func (Window) DeleteProperty

func (wnd Window) DeleteProperty(property Atom)

func (Window) Destroy

func (wnd Window) Destroy()

func (Window) FrameDecorationSpace

func (wnd Window) FrameDecorationSpace() (top, left, bottom, right float64)

func (Window) InvokeTask

func (wnd Window) InvokeTask(id uint64)

func (Window) Minimize

func (wnd Window) Minimize()

func (Window) Move

func (wnd Window) Move(where geom.Point)

func (Window) NewSurface

func (wnd Window) NewSurface(size geom.Size) *draw.Surface

func (Window) NextEventOfType

func (wnd Window) NextEventOfType(eventType int) *Event

func (Window) Property

func (wnd Window) Property(property Atom, requestedType Atom) (actualType Atom, actualFormat, count int, data unsafe.Pointer)

func (Window) Raise

func (wnd Window) Raise()

func (Window) Repaint

func (wnd Window) Repaint(bounds geom.Rect)

func (Window) RequestFocus

func (wnd Window) RequestFocus()

func (Window) SelectInput

func (wnd Window) SelectInput(mask int)

func (Window) Send

func (wnd Window) Send(eventMask int, evt Eventable)

func (Window) SetCursor

func (wnd Window) SetCursor(cursor Cursor)

func (Window) SetFrame

func (wnd Window) SetFrame(bounds geom.Rect)

func (Window) SetProtocols

func (wnd Window) SetProtocols(protocols ...Atom)

func (Window) SetTitle

func (wnd Window) SetTitle(title string)

func (Window) Show

func (wnd Window) Show()

func (Window) Title

func (wnd Window) Title() string

func (Window) Zoom

func (wnd Window) Zoom()

Jump to

Keyboard shortcuts

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