ipc

package
v0.0.0-...-8a10bf9 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputChange

type InputChange struct {
	Change string         `json:"change"`
	Input  IpcInputDevice `json:"input"`
}

type IpcClient

type IpcClient struct {
	// contains filtered or unexported fields
}

func NewIpcClient

func NewIpcClient() (*IpcClient, error)

func (*IpcClient) Close

func (s *IpcClient) Close() error

func (*IpcClient) Recv

func (s *IpcClient) Recv() (messageType IpcMsgType, out interface{}, err error)

func (*IpcClient) Send

func (s *IpcClient) Send(t IpcMsgType, data interface{}) error

func (*IpcClient) SendRaw

func (s *IpcClient) SendRaw(t IpcMsgType, data []byte) error

type IpcCmdResult

type IpcCmdResult []IpcResult

type IpcContainer

type IpcContainer struct {
	Name  string `json:"name"`
	AppId string `json:"app_id"`
}

type IpcHeader

type IpcHeader struct {
	Magic [6]byte
	Len   uint32
	Typ   IpcMsgType
}

type IpcInputDevice

type IpcInputDevice struct {
	Identifier           string   `json:"identifier"`
	Type                 string   `json:"type"`
	XkbActiveLayoutName  string   `json:"xkb_active_layout_name"`
	XkbLayoutNames       []string `json:"xkb_layout_names"`
	XkbActiveLayoutIndex int      `json:"xkb_active_layout_index"`
}

type IpcMsgType

type IpcMsgType uint32
const (
	IpcMsgTypeCommand   IpcMsgType = 0
	IpcMsgTypeSubscribe IpcMsgType = 2
	IpcMsgTypeGetInputs IpcMsgType = 100
	IpcEventTypeInput   IpcMsgType = 0x15
	IpcEventTypeWindow  IpcMsgType = 0x3
	IpcMsgTypeInvalid   IpcMsgType = 0x7fffffff
)

type IpcResult

type IpcResult struct {
	Success bool `json:"success"`
}

type WindowChange

type WindowChange struct {
	Change    string       `json:"change"`
	Container IpcContainer `json:"container"`
}

Jump to

Keyboard shortcuts

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