x11driver

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Overview

Package x11driver provides the X11 driver for oswin

Index

Constants

View Source
const (
	ShiftMask   = 1 << 0
	LockMask    = 1 << 1
	ControlMask = 1 << 2
	Mod1Mask    = 1 << 3
	Mod2Mask    = 1 << 4
	Mod3Mask    = 1 << 5
	Mod4Mask    = 1 << 6
	Mod5Mask    = 1 << 7
	Button1Mask = 1 << 8
	Button2Mask = 1 << 9
	Button3Mask = 1 << 10
	Button4Mask = 1 << 11
	Button5Mask = 1 << 12
)

These constants come from /usr/include/X11/X.h

Variables

View Source
var ClipTimeOut = 1 * time.Second

ClipTimeOut determines how long to wait before timing out waiting for the SelectionNotifyEvent

View Source
var ClipTransSize = uint32(1048576)

ClipTransSize determines how much data in bytes to transfer per call, 1MB

View Source
var WindowBorderWidth = 0

borderwidth doesn't seem to actually do anything in ubuntu or xfce

Functions

func AbsInt

func AbsInt(a int) int

func ButtonFromState

func ButtonFromState(state uint16) int

note: don't support chords -- just go in order..

func KeyModifiers

func KeyModifiers(state uint16) int32

func Main

func Main(f func(oswin.App))

Main is called by the program's main function to run the graphical application.

It calls f on the App, possibly in a separate goroutine, as some OS- specific libraries require being on 'the main thread'. It returns when f returns.

Types

type KeysymTable

type KeysymTable [256][2]uint32

func (*KeysymTable) Lookup

func (t *KeysymTable) Lookup(detail uint8, state uint16) (rune, key.Codes)

Jump to

Keyboard shortcuts

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