Documentation
¶
Index ¶
- Constants
- type ActiveSessionEvent
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateLayer(req CreateLayerRequest) (WindowCreatedEvent, error)
- func (c *Client) CreatePopup(req CreatePopupRequest) (WindowCreatedEvent, error)
- func (c *Client) CreateWindow(req CreateWindowRequest) (WindowCreatedEvent, error)
- func (c *Client) Damage(req DamageRequest) (Empty, error)
- func (c *Client) DestroyWindow(req DestroyWindowRequest) (Empty, error)
- func (c *Client) GetActiveSession(req Empty) (ActiveSessionEvent, error)
- func (c *Client) ListWindows(req Empty) (WindowListEvent, error)
- func (c *Client) Move(req MoveRequest) (Empty, error)
- func (c *Client) OnClose(fn func(sender uint32, ev CloseEvent))
- func (c *Client) OnConfigure(fn func(sender uint32, ev ConfigureEvent))
- func (c *Client) OnFocus(fn func(sender uint32, ev FocusEvent))
- func (c *Client) OnKey(fn func(sender uint32, ev KeyEvent))
- func (c *Client) OnMoved(fn func(sender uint32, ev MovedEvent))
- func (c *Client) OnPointerButton(fn func(sender uint32, ev PointerButtonEvent))
- func (c *Client) OnPointerEnter(fn func(sender uint32, ev PointerEnterEvent))
- func (c *Client) OnPointerLeave(fn func(sender uint32, ev PointerLeaveEvent))
- func (c *Client) OnPointerMotion(fn func(sender uint32, ev PointerMotionEvent))
- func (c *Client) OnSessionActivated(fn func(sender uint32, ev ActiveSessionEvent))
- func (c *Client) OnSessionResumed(fn func(sender uint32, ev ActiveSessionEvent))
- func (c *Client) OnSessionSuspended(fn func(sender uint32, ev ActiveSessionEvent))
- func (c *Client) OnShortcut(fn func(sender uint32, ev ShortcutEvent))
- func (c *Client) OnWindowCreated(fn func(sender uint32, ev WindowCreatedEvent))
- func (c *Client) OnWindowList(fn func(sender uint32, ev WindowListEvent))
- func (c *Client) RegisterSession(req RegisterSessionRequest) (Empty, error)
- func (c *Client) RegisterShortcut(req RegisterShortcutRequest) (Empty, error)
- func (c *Client) Resize(req ResizeRequest) (Empty, error)
- func (c *Client) SetActiveSession(req SetActiveSessionRequest) (Empty, error)
- func (c *Client) SetTimeout(timeout time.Duration)
- func (c *Client) SetTitle(req SetTitleRequest) (Empty, error)
- func (c *Client) SetWindowState(req SetWindowStateRequest) (Empty, error)
- func (c *Client) UnregisterShortcut(req UnregisterShortcutRequest) (Empty, error)
- type ClientEventType
- type ClientWindow
- type CloseEvent
- type ConfigureEvent
- type CreateLayerRequest
- type CreatePopupRequest
- type CreateWindowRequest
- type DamageRequest
- type DestroyWindowRequest
- type DisplayClient
- func (cl *DisplayClient) Close() error
- func (cl *DisplayClient) CreateLayer(layer, anchor uint32, exclusive, width, height int, opaqueHint bool) (*ClientWindow, error)
- func (cl *DisplayClient) CreatePopup(parent *ClientWindow, x, y, width, height int) (*ClientWindow, error)
- func (cl *DisplayClient) CreateWindow(width, height int) (*ClientWindow, error)
- func (cl *DisplayClient) ListWindows() ([]WindowInfo, error)
- func (cl *DisplayClient) Poll() *Event
- func (cl *DisplayClient) RegisterShortcut(shortcutID, windowID, scope uint32, key graphics.Key, ...) error
- func (cl *DisplayClient) RegisterShortcutEx(shortcutID, windowID, scope uint32, key graphics.Key, ch rune, ...) error
- func (cl *DisplayClient) SetWindowState(windowID, action uint32) error
- func (cl *DisplayClient) UnregisterShortcut(shortcutID uint32) error
- func (cl *DisplayClient) Wait() Event
- type Empty
- type Event
- type FocusEvent
- type KeyEvent
- type MoveRequest
- type MovedEvent
- type PointerButtonEvent
- type PointerEnterEvent
- type PointerLeaveEvent
- type PointerMotionEvent
- type RegisterSessionRequest
- type RegisterShortcutRequest
- type ResizeRequest
- type SetActiveSessionRequest
- type SetTitleRequest
- type SetWindowStateRequest
- type ShortcutEvent
- type UnregisterShortcutRequest
- type WindowCreatedEvent
- type WindowInfo
- type WindowListEvent
- type WindowListItem
Constants ¶
View Source
const ( LayerBackground uint32 = 0 LayerBottom uint32 = 1 LayerTop uint32 = 2 LayerOverlay uint32 = 3 )
View Source
const ( AnchorTop uint32 = 1 AnchorBottom uint32 = 2 AnchorLeft uint32 = 4 AnchorRight uint32 = 8 AnchorHorizontalCenter uint32 = 16 AnchorVerticalCenter uint32 = 32 )
View Source
const ( WindowFlagFocused uint32 = 1 << 0 WindowFlagMinimized uint32 = 1 << 1 WindowFlagMaximized uint32 = 1 << 2 WindowFlagVisible uint32 = 1 << 3 )
View Source
const ( WindowActionToggleMinimize uint32 = 0 WindowActionMinimize uint32 = 1 WindowActionRestore uint32 = 2 WindowActionToggleMaximize uint32 = 3 WindowActionFocus uint32 = 4 WindowActionClose uint32 = 5 )
View Source
const ( ShortcutScopeGlobal uint32 = 0 ShortcutScopeClient uint32 = 1 )
View Source
const ( ServiceName = "dev.avyos.display" ServiceID uint32 = 16 )
View Source
const ( RequestCreateWindow uint16 = 0x0201 RequestDestroyWindow uint16 = 0x0202 RequestSetTitle uint16 = 0x0203 RequestDamage uint16 = 0x0204 RequestResize uint16 = 0x0205 RequestMove uint16 = 0x0206 RequestCreateLayer uint16 = 0x0207 RequestCreatePopup uint16 = 0x0208 RequestListWindows uint16 = 0x0209 RequestSetWindowState uint16 = 0x020a RequestRegisterSession uint16 = 0x020b RequestSetActiveSession uint16 = 0x020c RequestGetActiveSession uint16 = 0x020d RequestRegisterShortcut uint16 = 0x020e RequestUnregisterShortcut uint16 = 0x020f )
View Source
const ( EventWindowCreated uint16 = 0x0301 EventConfigure uint16 = 0x0302 EventClose uint16 = 0x0303 EventPointerEnter uint16 = 0x0304 EventPointerLeave uint16 = 0x0305 EventPointerMotion uint16 = 0x0306 EventPointerButton uint16 = 0x0307 EventKey uint16 = 0x0308 EventFocus uint16 = 0x0309 EventMoved uint16 = 0x030a EventWindowList uint16 = 0x030b EventSessionActivated uint16 = 0x030c EventSessionSuspended uint16 = 0x030d EventSessionResumed uint16 = 0x030e EventShortcut uint16 = 0x030f )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveSessionEvent ¶
type ActiveSessionEvent struct {
SessionID uint32
}
func (ActiveSessionEvent) MarshalBinary ¶
func (v ActiveSessionEvent) MarshalBinary() []byte
func (*ActiveSessionEvent) UnmarshalBinary ¶
func (v *ActiveSessionEvent) UnmarshalBinary(data []byte) error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateLayer ¶
func (c *Client) CreateLayer(req CreateLayerRequest) (WindowCreatedEvent, error)
func (*Client) CreatePopup ¶
func (c *Client) CreatePopup(req CreatePopupRequest) (WindowCreatedEvent, error)
func (*Client) CreateWindow ¶
func (c *Client) CreateWindow(req CreateWindowRequest) (WindowCreatedEvent, error)
func (*Client) DestroyWindow ¶
func (c *Client) DestroyWindow(req DestroyWindowRequest) (Empty, error)
func (*Client) GetActiveSession ¶
func (c *Client) GetActiveSession(req Empty) (ActiveSessionEvent, error)
func (*Client) ListWindows ¶
func (c *Client) ListWindows(req Empty) (WindowListEvent, error)
func (*Client) OnClose ¶
func (c *Client) OnClose(fn func(sender uint32, ev CloseEvent))
func (*Client) OnConfigure ¶
func (c *Client) OnConfigure(fn func(sender uint32, ev ConfigureEvent))
func (*Client) OnFocus ¶
func (c *Client) OnFocus(fn func(sender uint32, ev FocusEvent))
func (*Client) OnMoved ¶
func (c *Client) OnMoved(fn func(sender uint32, ev MovedEvent))
func (*Client) OnPointerButton ¶
func (c *Client) OnPointerButton(fn func(sender uint32, ev PointerButtonEvent))
func (*Client) OnPointerEnter ¶
func (c *Client) OnPointerEnter(fn func(sender uint32, ev PointerEnterEvent))
func (*Client) OnPointerLeave ¶
func (c *Client) OnPointerLeave(fn func(sender uint32, ev PointerLeaveEvent))
func (*Client) OnPointerMotion ¶
func (c *Client) OnPointerMotion(fn func(sender uint32, ev PointerMotionEvent))
func (*Client) OnSessionActivated ¶
func (c *Client) OnSessionActivated(fn func(sender uint32, ev ActiveSessionEvent))
func (*Client) OnSessionResumed ¶
func (c *Client) OnSessionResumed(fn func(sender uint32, ev ActiveSessionEvent))
func (*Client) OnSessionSuspended ¶
func (c *Client) OnSessionSuspended(fn func(sender uint32, ev ActiveSessionEvent))
func (*Client) OnShortcut ¶
func (c *Client) OnShortcut(fn func(sender uint32, ev ShortcutEvent))
func (*Client) OnWindowCreated ¶
func (c *Client) OnWindowCreated(fn func(sender uint32, ev WindowCreatedEvent))
func (*Client) OnWindowList ¶
func (c *Client) OnWindowList(fn func(sender uint32, ev WindowListEvent))
func (*Client) RegisterSession ¶
func (c *Client) RegisterSession(req RegisterSessionRequest) (Empty, error)
func (*Client) RegisterShortcut ¶
func (c *Client) RegisterShortcut(req RegisterShortcutRequest) (Empty, error)
func (*Client) SetActiveSession ¶
func (c *Client) SetActiveSession(req SetActiveSessionRequest) (Empty, error)
func (*Client) SetTimeout ¶
func (*Client) SetWindowState ¶
func (c *Client) SetWindowState(req SetWindowStateRequest) (Empty, error)
func (*Client) UnregisterShortcut ¶
func (c *Client) UnregisterShortcut(req UnregisterShortcutRequest) (Empty, error)
type ClientEventType ¶
type ClientEventType int
const ( ClientEventWindowCreated ClientEventType = iota ClientEventConfigure ClientEventClose ClientEventPointerEnter ClientEventPointerLeave ClientEventPointerMotion ClientEventPointerButton ClientEventKey ClientEventFocus ClientEventMoved ClientEventWindowList ClientEventShortcut )
type ClientWindow ¶
type ClientWindow struct {
ID uint32
X, Y int
Width int
Height int
// contains filtered or unexported fields
}
func (*ClientWindow) Buffer ¶
func (w *ClientWindow) Buffer() *graphics.Buffer
func (*ClientWindow) DamageAll ¶
func (w *ClientWindow) DamageAll() error
func (*ClientWindow) Destroy ¶
func (w *ClientWindow) Destroy() error
func (*ClientWindow) Resize ¶
func (w *ClientWindow) Resize(width, height int) error
func (*ClientWindow) SetTitle ¶
func (w *ClientWindow) SetTitle(title string) error
type CloseEvent ¶
type CloseEvent struct {
WindowID uint32
}
func (CloseEvent) MarshalBinary ¶
func (v CloseEvent) MarshalBinary() []byte
func (*CloseEvent) UnmarshalBinary ¶
func (v *CloseEvent) UnmarshalBinary(data []byte) error
type ConfigureEvent ¶
func (ConfigureEvent) MarshalBinary ¶
func (v ConfigureEvent) MarshalBinary() []byte
func (*ConfigureEvent) UnmarshalBinary ¶
func (v *ConfigureEvent) UnmarshalBinary(data []byte) error
type CreateLayerRequest ¶
type CreateLayerRequest struct {
Layer uint32
Anchor uint32
Exclusive int
OpaqueHint bool
ShmKey string
Width int
Height int
Stride int
}
func (CreateLayerRequest) MarshalBinary ¶
func (v CreateLayerRequest) MarshalBinary() []byte
func (*CreateLayerRequest) UnmarshalBinary ¶
func (v *CreateLayerRequest) UnmarshalBinary(data []byte) error
type CreatePopupRequest ¶
type CreatePopupRequest struct {
ParentID uint32
X int
Y int
ShmKey string
Width int
Height int
Stride int
}
func (CreatePopupRequest) MarshalBinary ¶
func (v CreatePopupRequest) MarshalBinary() []byte
func (*CreatePopupRequest) UnmarshalBinary ¶
func (v *CreatePopupRequest) UnmarshalBinary(data []byte) error
type CreateWindowRequest ¶
func (CreateWindowRequest) MarshalBinary ¶
func (v CreateWindowRequest) MarshalBinary() []byte
func (*CreateWindowRequest) UnmarshalBinary ¶
func (v *CreateWindowRequest) UnmarshalBinary(data []byte) error
type DamageRequest ¶
func (DamageRequest) MarshalBinary ¶
func (v DamageRequest) MarshalBinary() []byte
func (*DamageRequest) UnmarshalBinary ¶
func (v *DamageRequest) UnmarshalBinary(data []byte) error
type DestroyWindowRequest ¶
type DestroyWindowRequest struct {
WindowID uint32
}
func (DestroyWindowRequest) MarshalBinary ¶
func (v DestroyWindowRequest) MarshalBinary() []byte
func (*DestroyWindowRequest) UnmarshalBinary ¶
func (v *DestroyWindowRequest) UnmarshalBinary(data []byte) error
type DisplayClient ¶
type DisplayClient struct {
// contains filtered or unexported fields
}
func Dial ¶
func Dial() (*DisplayClient, error)
func DialDisplay ¶
func DialDisplay(socketPath string) (*DisplayClient, error)
func (*DisplayClient) Close ¶
func (cl *DisplayClient) Close() error
func (*DisplayClient) CreateLayer ¶
func (cl *DisplayClient) CreateLayer(layer, anchor uint32, exclusive, width, height int, opaqueHint bool) (*ClientWindow, error)
func (*DisplayClient) CreatePopup ¶
func (cl *DisplayClient) CreatePopup(parent *ClientWindow, x, y, width, height int) (*ClientWindow, error)
func (*DisplayClient) CreateWindow ¶
func (cl *DisplayClient) CreateWindow(width, height int) (*ClientWindow, error)
func (*DisplayClient) ListWindows ¶
func (cl *DisplayClient) ListWindows() ([]WindowInfo, error)
func (*DisplayClient) Poll ¶
func (cl *DisplayClient) Poll() *Event
func (*DisplayClient) RegisterShortcut ¶
func (*DisplayClient) RegisterShortcutEx ¶
func (*DisplayClient) SetWindowState ¶
func (cl *DisplayClient) SetWindowState(windowID, action uint32) error
func (*DisplayClient) UnregisterShortcut ¶
func (cl *DisplayClient) UnregisterShortcut(shortcutID uint32) error
func (*DisplayClient) Wait ¶
func (cl *DisplayClient) Wait() Event
type FocusEvent ¶
func (FocusEvent) MarshalBinary ¶
func (v FocusEvent) MarshalBinary() []byte
func (*FocusEvent) UnmarshalBinary ¶
func (v *FocusEvent) UnmarshalBinary(data []byte) error
type MoveRequest ¶
func (MoveRequest) MarshalBinary ¶
func (v MoveRequest) MarshalBinary() []byte
func (*MoveRequest) UnmarshalBinary ¶
func (v *MoveRequest) UnmarshalBinary(data []byte) error
type MovedEvent ¶
func (MovedEvent) MarshalBinary ¶
func (v MovedEvent) MarshalBinary() []byte
func (*MovedEvent) UnmarshalBinary ¶
func (v *MovedEvent) UnmarshalBinary(data []byte) error
type PointerButtonEvent ¶
func (PointerButtonEvent) MarshalBinary ¶
func (v PointerButtonEvent) MarshalBinary() []byte
func (*PointerButtonEvent) UnmarshalBinary ¶
func (v *PointerButtonEvent) UnmarshalBinary(data []byte) error
type PointerEnterEvent ¶
func (PointerEnterEvent) MarshalBinary ¶
func (v PointerEnterEvent) MarshalBinary() []byte
func (*PointerEnterEvent) UnmarshalBinary ¶
func (v *PointerEnterEvent) UnmarshalBinary(data []byte) error
type PointerLeaveEvent ¶
type PointerLeaveEvent struct {
WindowID uint32
}
func (PointerLeaveEvent) MarshalBinary ¶
func (v PointerLeaveEvent) MarshalBinary() []byte
func (*PointerLeaveEvent) UnmarshalBinary ¶
func (v *PointerLeaveEvent) UnmarshalBinary(data []byte) error
type PointerMotionEvent ¶
func (PointerMotionEvent) MarshalBinary ¶
func (v PointerMotionEvent) MarshalBinary() []byte
func (*PointerMotionEvent) UnmarshalBinary ¶
func (v *PointerMotionEvent) UnmarshalBinary(data []byte) error
type RegisterSessionRequest ¶
func (RegisterSessionRequest) MarshalBinary ¶
func (v RegisterSessionRequest) MarshalBinary() []byte
func (*RegisterSessionRequest) UnmarshalBinary ¶
func (v *RegisterSessionRequest) UnmarshalBinary(data []byte) error
type RegisterShortcutRequest ¶
type RegisterShortcutRequest struct {
ShortcutID uint32
WindowID uint32
Scope uint32
Key input.Key
Rune rune
Modifiers uint8
}
func (RegisterShortcutRequest) MarshalBinary ¶
func (v RegisterShortcutRequest) MarshalBinary() []byte
func (*RegisterShortcutRequest) UnmarshalBinary ¶
func (v *RegisterShortcutRequest) UnmarshalBinary(data []byte) error
type ResizeRequest ¶
func (ResizeRequest) MarshalBinary ¶
func (v ResizeRequest) MarshalBinary() []byte
func (*ResizeRequest) UnmarshalBinary ¶
func (v *ResizeRequest) UnmarshalBinary(data []byte) error
type SetActiveSessionRequest ¶
type SetActiveSessionRequest struct {
SessionID uint32
}
func (SetActiveSessionRequest) MarshalBinary ¶
func (v SetActiveSessionRequest) MarshalBinary() []byte
func (*SetActiveSessionRequest) UnmarshalBinary ¶
func (v *SetActiveSessionRequest) UnmarshalBinary(data []byte) error
type SetTitleRequest ¶
func (SetTitleRequest) MarshalBinary ¶
func (v SetTitleRequest) MarshalBinary() []byte
func (*SetTitleRequest) UnmarshalBinary ¶
func (v *SetTitleRequest) UnmarshalBinary(data []byte) error
type SetWindowStateRequest ¶
func (SetWindowStateRequest) MarshalBinary ¶
func (v SetWindowStateRequest) MarshalBinary() []byte
func (*SetWindowStateRequest) UnmarshalBinary ¶
func (v *SetWindowStateRequest) UnmarshalBinary(data []byte) error
type ShortcutEvent ¶
type ShortcutEvent struct {
ShortcutID uint32
WindowID uint32
Scope uint32
Key input.Key
Rune rune
Modifiers uint8
}
func (ShortcutEvent) MarshalBinary ¶
func (v ShortcutEvent) MarshalBinary() []byte
func (*ShortcutEvent) UnmarshalBinary ¶
func (v *ShortcutEvent) UnmarshalBinary(data []byte) error
type UnregisterShortcutRequest ¶
type UnregisterShortcutRequest struct {
ShortcutID uint32
}
func (UnregisterShortcutRequest) MarshalBinary ¶
func (v UnregisterShortcutRequest) MarshalBinary() []byte
func (*UnregisterShortcutRequest) UnmarshalBinary ¶
func (v *UnregisterShortcutRequest) UnmarshalBinary(data []byte) error
type WindowCreatedEvent ¶
func (WindowCreatedEvent) MarshalBinary ¶
func (v WindowCreatedEvent) MarshalBinary() []byte
func (*WindowCreatedEvent) UnmarshalBinary ¶
func (v *WindowCreatedEvent) UnmarshalBinary(data []byte) error
type WindowInfo ¶
type WindowListEvent ¶
type WindowListEvent struct {
Windows []WindowListItem
}
func (WindowListEvent) MarshalBinary ¶
func (v WindowListEvent) MarshalBinary() []byte
func (*WindowListEvent) UnmarshalBinary ¶
func (v *WindowListEvent) UnmarshalBinary(data []byte) error
type WindowListItem ¶
func (WindowListItem) MarshalBinary ¶
func (v WindowListItem) MarshalBinary() []byte
func (*WindowListItem) UnmarshalBinary ¶
func (v *WindowListItem) UnmarshalBinary(data []byte) error
Click to show internal directories.
Click to hide internal directories.