motif

package
v0.0.0-...-f294442 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package motif has a few functions to allow easy access to Motif related properties.

The main purpose here is that some applications communicate "no window decorations" to the window manager using _MOTIF_WM_HINTS. (Like Google Chrome.) I haven't seen Motif stuff used for other purposes in the wild for a long time.

As a result, only the useful bits are implemented here. More may be added on an on-demand basis, but don't count on it.

Try not to bash your head against your desk too hard: http://www.opengroup.org/openmotif/hardcopydocs.html

Example

To test if a window wants decorations or not:

mh, err := motif.WmHintsGet(XUtilValue, window-id)
if err != nil {
	log.Fatal(err)
} else {
	log.Println("Decorations? ", motif.Decor(mh))
}

Index

Constants

View Source
const (
	HintFunctions = (1 << iota)
	HintDecorations
	HintInputMode
	HintStatus
)
View Source
const (
	FunctionAll = (1 << iota)
	FunctionResize
	FunctionMove
	FunctionMinimize
	FunctionMaximize
	FunctionClose
	FunctionNone = 0
)
View Source
const (
	DecorationAll = (1 << iota)
	DecorationBorder
	DecorationResizeH
	DecorationTitle
	DecorationMenu
	DecorationMinimize
	DecorationMaximize
	DecorationNone = 0
)
View Source
const (
	InputPrimaryApplicationModal = (1 << iota)
	InputSystemModal
	InputFullApplicationModal
	InputModeless = 0
)
View Source
const StatusTearoffWindow = 1

Variables

This section is empty.

Functions

func Decor

func Decor(mh *Hints) bool

Decor checks a Hints value for whether or not the client has requested that the window manager paint decorations. That is, Decor returns false when the hints provided indicate no decorations and true otherwise.

func WmHintsSet

func WmHintsSet(xu *xgbutil.XUtil, win xproto.Window, mh *Hints) error

_MOTIF_WM_HINTS set

Types

type Hints

type Hints struct {
	Flags                               uint
	Function, Decoration, Input, Status uint
}

Hints is a struct that organizes the information related to the WM_NORMAL_HINTS property.

func WmHintsGet

func WmHintsGet(xu *xgbutil.XUtil, win xproto.Window) (mh *Hints, err error)

_MOTIF_WM_HINTS get

Jump to

Keyboard shortcuts

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