wlc

package module
v0.0.0-...-04c0927 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2017 License: MIT Imports: 6 Imported by: 5

README

go-wlc

Go Report Card GoDoc

Go bindings for wlc.

Example

An example can be found in example/example.go. It is a port of the example found in the wlc repo. Run it with:

$ go run example/example.go

License

See LICENSE file.

Documentation

Index

Constants

View Source
const (
	EventReadable  EventBit = 0x01
	EventWriteable          = 0x02
	EventHangup             = 0x04
	EventError              = 0x08
)
View Source
const (
	BitMaximized  ViewStateBit = 1 << 0
	BitFullscreen              = 1 << 1
	BitResizing                = 1 << 2
	BitMoving                  = 1 << 3
	BitActivated               = 1 << 4
)
View Source
const (
	BitOverrideRedirect ViewTypeBit = 1 << 0
	BitUnmanaged                    = 1 << 1
	BitSplash                       = 1 << 2
	BitModal                        = 1 << 3
	BitPopup                        = 1 << 4
)
View Source
const (
	PropertyTitle ViewPropertyUpdateBit = 1 << 0
	PropertyClass                       = 1 << 1
	PropertyAppID                       = 1 << 2
	PropertyPID                         = 1 << 3
)
View Source
const (
	ResizeEdgeNone        ResizeEdge = 0
	ResizeEdgeTop                    = 1
	ResizeEdgeBottom                 = 2
	ResizeEdgeLeft                   = 4
	ResizeEdgeTopLeft                = 5
	ResizeEdgeBottomLeft             = 6
	ResizeEdgeRight                  = 8
	ResizeEdgeTopRight               = 9
	ResizeEdgeBottomRight            = 10
)
View Source
const (
	BitModShift ModifierBit = 1 << 0
	BitModCaps              = 1 << 1
	BitModCtrl              = 1 << 2
	BitModAlt               = 1 << 3
	BitModMod2              = 1 << 4
	BitModMod3              = 1 << 5
	BitModMod5              = 1 << 7
)
View Source
const (
	BitLedNum    LedBit = 1 << 0
	BitLedCaps          = 1 << 1
	BitLedScroll        = 1 << 2
)
View Source
const (
	ButtonStateReleased = 0
	ButtonStatePressed  = 1
)
View Source
const (
	BitAnchorNone   = 0
	BitAnchorTop    = 1 << 0
	BitAnchorBottom = 1 << 1
	BitAnchorLeft   = 1 << 2
	BitAnchorRight  = 1 << 3
)
View Source
const (
	BitGravityNone   = 0
	BitGravityTop    = 1 << 0
	BitGravityBottom = 1 << 1
	BitGravityLeft   = 1 << 2
	BitGravityRight  = 1 << 3
)
View Source
const (
	BitConstraintAdjustmentNone    = 0
	BitConstraintAdjustmentSlideX  = 1 << 0
	BitConstraintAdjustmentSlideY  = 1 << 1
	BitConstraintAdjustmentFlipX   = 1 << 2
	BitConstraintAdjustmentFlipY   = 1 << 3
	BitConstraintAdjustmentResizeX = 1 << 4
	BitConstraintAdjustmentResizeY = 1 << 5
)

Variables

View Source
var (
	// PointZero defines a point at (0,0).
	PointZero = Point{0, 0}
	// SizeZero defines a size 0x0.
	SizeZero = Size{0, 0}
	// GeometryZero defines a geometry with size 0x0 at point (0,0).
	GeometryZero = Geometry{Point{0, 0}, Size{0, 0}}
)

Functions

func EventSourceRemove

func EventSourceRemove(source EventSource)

EventSourceRemove removes event source from event loop.

func EventSourceTimerUpdate

func EventSourceTimerUpdate(source EventSource, msDelay int32) bool

EventSourceTimerUpdate updates timer to trigger after delay. Returns true on success.

func Exec

func Exec(bin string, arg ...string)

Exec program.

func GeometryContains

func GeometryContains(a, b Geometry) bool

GeometryContains check if b is contained in a.

func GeometryEquals

func GeometryEquals(a, b Geometry) bool

GeometryEquals compares two geometries.

func GetWLDisplay

func GetWLDisplay() *C.struct_wl_display

GetWLDisplay returns wayland display.

func HandleGetUserData

func HandleGetUserData(handle View) unsafe.Pointer

HandleGetUserData gets custom linked user data from handle.

func HandleSetUserData

func HandleSetUserData(handle View, userdata unsafe.Pointer)

HandleSetUserData can be used to link custom data to handle. Client must allocate and handle the data as some C type.

func Init

func Init() bool

Init initializeses wlc. Returns false on failure.

Avoid running unverified code before Init as wlc compositor may be run with higher privileges on non logind systems where compositor binary needs to be suid.

Init's purpose is to initialize and drop privileges as soon as possible.

func KeyboardGetCurrentKeys

func KeyboardGetCurrentKeys() []uint32

KeyboardGetCurrentKeys gets currently held keys.

func KeyboardGetKeysymForKey

func KeyboardGetKeysymForKey(key uint32, mods *Modifiers) uint32

KeyboardGetKeysymForKey is an utility function to convert raw keycode to keysym. Passed modifiers may transform the key.

func KeyboardGetUtf32ForKey

func KeyboardGetUtf32ForKey(key uint32, mods *Modifiers) uint32

KeyboardGetUtf32ForKey is an utility function to convert raw keycode to Unicdoe/UTF-32 codepoint. Passed modifiers may transform the key.

func KeyboardGetXKBKeymap

func KeyboardGetXKBKeymap() *C.struct_xkb_keymap

KeyboardGetXKBKeymap exposes xkb_keymap. Can be used for more advanced key handling. This is currently only exposed as a C struct.

func KeyboardGetXKBState

func KeyboardGetXKBState() *C.struct_xkb_state

KeyboardGetXKBState exposes xkb_state. Can be used for more advanced key handling. This is currently only exposed as a C struct.

func LogSetHandler

func LogSetHandler(handler func(LogType, string))

LogSetHandler sets log handler. Can be set before Init.

func OutputUnfocus

func OutputUnfocus()

OutputUnfocus unfocuses all outputs.

func PixelsRead

func PixelsRead(format PixelFormat, geometry Geometry, outGeometry *Geometry, outData unsafe.Pointer)

PixelsRead read pixel data from output's framebuffer. If the geometry is out of bounds, it will be automatically clamped. Potentially clamped geometry will be stored in out_geometry, to indicate width / height of the returned data. TODO: make more go friendly

func PixelsWrite

func PixelsWrite(format PixelFormat, geometry Geometry, data unsafe.Pointer)

PixelsWrite write pixel data with the specific format to outputs framebuffer. If geometry is out of bounds, it will be automatically clamped. TODO: make more go friendly

func PointEquals

func PointEquals(a, b Point) bool

PointEquals compares two points.

func PointerSetPosition

func PointerSetPosition(pos Point)

PointerSetPosition sets pointer position.

func Run

func Run()

Run event loop.

func SetCompositorReadyCb

func SetCompositorReadyCb(cb func())

SetCompositorReadyCb sets callback to trigger when compositor is ready to accept clients.

func SetCompositorTerminateCb

func SetCompositorTerminateCb(cb func())

SetCompositorTerminateCb sets callback to trigger when compositor is about to terminate.

func SetInputCreatedCb

func SetInputCreatedCb(cb func(*C.struct_libinput_device) bool)

SetInputCreatedCb sets callback to trigger when input device is created. Return value of callback does nothing. (Experimental).

func SetInputDestroyedCb

func SetInputDestroyedCb(cb func(*C.struct_libinput_device))

SetInputDestroyedCb sets callback to trigger when input device was destroyed. (Experimental).

func SetKeyboardKeyCb

func SetKeyboardKeyCb(cb func(View, uint32, Modifiers, uint32, KeyState) bool)

SetKeyboardKeyCb sets callback to trigger when key event was triggered, view handle will be zero if there was no focus. Callback can return true to prevent sending the event to clients.

func SetOutputContextCreated

func SetOutputContextCreated(cb func(Output))

SetOutputContextCreated sets callback to trigger when output context is created. This generally happens on startup and when current tty changes.

func SetOutputContextDestroyed

func SetOutputContextDestroyed(cb func(Output))

SetOutputContextDestroyed sets callback to trigger when output context is destroyed.

func SetOutputCreatedCb

func SetOutputCreatedCb(cb func(Output) bool)

SetOutputCreatedCb sets callback to trigger when output is created. Callback should return false if you want to destroy the output. (e.g. failed to allocate data related to view)

func SetOutputDestroyedCb

func SetOutputDestroyedCb(cb func(Output))

SetOutputDestroyedCb sets callback to trigger when output is destroyed.

func SetOutputFocusCb

func SetOutputFocusCb(fn func(Output, bool))

SetOutputFocusCb sets callback to trigger when output got or lost focus.

func SetOutputRenderPostCb

func SetOutputRenderPostCb(cb func(Output))

SetOutputRenderPostCb sets the post render hook for output.

func SetOutputRenderPreCb

func SetOutputRenderPreCb(cb func(Output))

SetOutputRenderPreCb sets the pre render hook for output.

func SetOutputResolutionCb

func SetOutputResolutionCb(cb func(Output, *Size, *Size))

SetOutputResolutionCb sets callback to trigger when output resolution changed.

func SetPointerButtonCb

func SetPointerButtonCb(cb func(View, uint32, Modifiers, uint32, ButtonState, *Point) bool)

SetPointerButtonCb sets callback to trigger when button event was triggered, view handle will be zero if there was no focus. Callback can return true to prevent sending the event to clients.

func SetPointerMotionCb

func SetPointerMotionCb(cb func(View, uint32, *Point) bool)

SetPointerMotionCb sets callback to trigger when motion event was triggered, view handle will be zero if there was no focus. Apply with wlc_pointer_set_position to agree. Callback can return true to prevent sending the event to clients.

func SetPointerScrollCb

func SetPointerScrollCb(cb func(View, uint32, Modifiers, uint8, [2]float64) bool)

SetPointerScrollCb sets callback to trigger when scroll event was triggered, view handle will be zero if there was no focus. Callback can return true to prevent sending the event to clients.

func SetTouchCb

func SetTouchCb(cb func(View, uint32, Modifiers, TouchType, int32, *Point) bool)

SetTouchCb sets callback to trigger when touch event was triggered, view handle will be zero if there was no focus. Callback can return true to prevent sending the event to clients.

func SetViewCreatedCb

func SetViewCreatedCb(cb func(View) bool)

SetViewCreatedCb sets callback to trigger when view is created. Callback should return false if you want to destroy the view. (e.g. failed to allocate data related to view).

func SetViewDestroyedCb

func SetViewDestroyedCb(cb func(View))

SetViewDestroyedCb sets callback to trigger when view is destroyed.

func SetViewFocusCb

func SetViewFocusCb(cb func(View, bool))

SetViewFocusCb sets callback to trigger when view got or lost focus.

func SetViewMoveToOutputCb

func SetViewMoveToOutputCb(cb func(View, Output, Output))

SetViewMoveToOutputCb sets callback to trigger when view is moved to an output.

func SetViewPropertiesUpdatedCb

func SetViewPropertiesUpdatedCb(cb func(View, ViewPropertyUpdateBit))

SetViewPropertiesUpdatedCb sets callback to trigger when view properties are updated.

func SetViewRenderPostCb

func SetViewRenderPostCb(cb func(View))

SetViewRenderPostCb sets the post render hook for view.

func SetViewRenderPreCb

func SetViewRenderPreCb(cb func(View))

SetViewRenderPreCb sets the pre render hook for view.

func SetViewRequestGeometryCb

func SetViewRequestGeometryCb(cb func(View, *Geometry))

SetViewRequestGeometryCb sets callback to trigger when a view requests to set geometry. Apply using View.SetGeometry to agree.

func SetViewRequestMoveCb

func SetViewRequestMoveCb(cb func(View, *Point))

SetViewRequestMoveCb sets callback to trigger when view requests to move itself. Start an interactive move to agree.

func SetViewRequestResizeCb

func SetViewRequestResizeCb(cb func(View, uint32, *Point))

SetViewRequestResizeCb sets callback to trigger when view requests to resize iteself with the given edge. Start an interactive resize to agree.

func SetViewRequestStateCb

func SetViewRequestStateCb(cb func(View, ViewStateBit, bool))

SetViewRequestStateCb sets callback to trigger when a view requests to disable or enable the given state. Apply using View.SetState to agree.

func SizeEquals

func SizeEquals(a, b Size) bool

SizeEquals compares two sizes.

func SurfaceGetWLResource

func SurfaceGetWLResource(surface Resource) *C.struct_wl_resource

SurfaceGetWLResource returns wl_surface resource from internal wlc surface.

func Terminate

func Terminate()

Terminate wlc.

func ViewUnfocus

func ViewUnfocus()

ViewUnfocus unfocuses all views.

Types

type BackendType

type BackendType C.enum_wlc_backend_type
const (
	BackendNone BackendType = iota
	BackendDrm
	BackendX11
)

func GetBackendType

func GetBackendType() BackendType

GetBackendType queries for the backend wlc is using.

type ButtonState

type ButtonState C.enum_wlc_button_state

type EventBit

type EventBit C.enum_wlc_event_bit

type EventSource

type EventSource *C.struct_wlc_event_source

EventSource is a reference to struct wlc_event_source which is handled internally by wlc.

func EventLoopAddFd

func EventLoopAddFd(fd int, mask uint32, cb func(int, uint32, interface{}), arg interface{}) EventSource

EventLoopAddFd adds fd to event loop.

func EventLoopAddTimer

func EventLoopAddTimer(cb func(interface{}), arg interface{}) EventSource

EventLoopAddTimer adds timer to event loop.

type Geometry

type Geometry struct {
	Origin Point
	Size   Size
}

Geometry is a fixed 2D point, size pair.

type KeyState

type KeyState C.enum_wlc_key_state
const (
	KeyStateReleased KeyState = 0
	KeyStatePressed           = 1
)

type LedBit

type LedBit C.enum_wlc_led_bit

type LogType

type LogType C.enum_wlc_log_type
const (
	LogInfo LogType = iota
	LogWarn
	LogError
	LogWayland
)

type ModifierBit

type ModifierBit C.enum_wlc_modifier_bit

type Modifiers

type Modifiers struct {
	Leds uint32
	Mods uint32
}

Modifiers describes the state of keyboard modifiers in various functions.

type Output

type Output C.wlc_handle

Output is a wlc_handle describing an output object in wlc.

func GetFocusedOutput

func GetFocusedOutput() Output

GetFocusedOutput gets focused output.

func GetOutputs

func GetOutputs() []Output

GetOutputs gets a list of outputs.

func HandleFromWLOutputResource

func HandleFromWLOutputResource(resource *C.struct_wl_resource) Output

HandleFromWLOutputResource returns output handle from wl_output resource.

func (Output) Focus

func (o Output) Focus()

Focus focuses output.

func (Output) GetMask

func (o Output) GetMask() uint32

GetMask gets current visibility bitmask.

func (Output) GetMutableViews

func (o Output) GetMutableViews() []View

GetMutableViews gets mutable views in creation order. This is mainly useful for wm's who need another view stack for inplace sorting. For example tiling wms, may want to use this to keep their tiling order separated from floating order.

func (Output) GetRenderer

func (o Output) GetRenderer() Renderer

GetRenderer returns currently active renderer on the given output.

func (Output) GetResolution

func (o Output) GetResolution() *Size

GetResolution gets real output resolution applied by either wlc_output_set_resolution call or initially. Do not use this for coordinate boundary.

func (Output) GetScale

func (o Output) GetScale() uint32

GetScale returns scale factor.

func (Output) GetSleep

func (o Output) GetSleep() bool

GetSleep gets output sleep state.

func (Output) GetViews

func (o Output) GetViews() []View

GetViews gets views in stack order.

func (Output) GetVirtualResolution

func (o Output) GetVirtualResolution() *Size

GetVirtualResolution gets virtual output resolution with transformations applied for proper rendering for example on high density displays. Use this to figure out coordinate boundary.

func (Output) Name

func (o Output) Name() string

Name gets output name.

func (Output) ScheduleRender

func (o Output) ScheduleRender()

ScheduleRender schedules output for rendering next frame. If output was already scheduled this is no-op, if output is currently rendering, it will render immediately after.

func (Output) SetMask

func (o Output) SetMask(mask uint32)

SetMask sets visibility bitmask.

func (Output) SetResolution

func (o Output) SetResolution(resolution Size, scale uint32)

SetResolution sets output resolution.

func (Output) SetSleep

func (o Output) SetSleep(sleep bool)

SetSleep sets sleep status: wake up / sleep.

func (Output) SetViews

func (o Output) SetViews(views []View) bool

SetViews sets views in stack order. This will also change mutable views. Returns false on failure.

type PixelFormat

type PixelFormat C.enum_wlc_pixel_format

PixelFormat describes the pixelformat used when writing/reading pixels.

const (
	// RGBA8888 defines a color format where each channel is 8 bits.
	RGBA8888 PixelFormat = iota
)

type Point

type Point struct {
	X, Y int32
}

Point is a fixed 2D point.

func PointMax

func PointMax(a, b Point) Point

PointMax returns the biggest values of two points.

func PointMin

func PointMin(a, b Point) Point

PointMin returns the smallest values of two points.

func PointerGetPosition

func PointerGetPosition() *Point

PointerGetPosition gets current pointer position.

type PositionerAnchorBit

type PositionerAnchorBit C.enum_wlc_positioner_anchor_bit

type PositionerGravityBit

type PositionerGravityBit C.enum_wlc_positioner_gravity_bit

type Renderer

type Renderer C.enum_wlc_renderer

Renderer defines enabled renderers.

const (
	// RendererGLES2 defines a GLES2 renderer.
	RendererGLES2 Renderer = iota
	// NoRenderer defines no renderer.
	NoRenderer
)

type ResizeEdge

type ResizeEdge C.enum_wlc_resize_edge

type Resource

type Resource C.wlc_resource

Resource is a wlc resource.

func HandleFromWLSurfaceResource

func HandleFromWLSurfaceResource(resource *C.struct_wl_resource) Resource

HandleFromWLSurfaceResource returns internal wlc surface from wl_surface resource.

func (Resource) FlushFrameCallbacks

func (s Resource) FlushFrameCallbacks()

FlushFrameCallbacks adds frame callbacks of the given surface for the next output frame. It applies recursively to all subsurfaces. Useful when the compositor creates custom animations which require disabling internal rendering, but still need to update the surface textures (for ex. video players).

func (Resource) GetSubsurfaceGeometry

func (s Resource) GetSubsurfaceGeometry() Geometry

GetSubsurfaceGeometry returns the size of a subsurface and its position relative to parent surface.

func (Resource) GetSubsurfaces

func (s Resource) GetSubsurfaces() []Resource

GetSubsurfaces returns a list of subsurfaces for a surface.

func (Resource) GetTextures

func (s Resource) GetTextures() ([3]uint32, SurfaceFormat, error)

GetTextures returns an array with the textures of a surface. Returns error if surface is invalid. Note that these are not only OpenGL textures but rather render-specific.

func (Resource) Render

func (s Resource) Render(geometry Geometry)

Render renders surfaces inside post / pre render hooks.

type ScrollAxisBit

type ScrollAxisBit C.enum_wlc_scroll_axis_bit
const (
	ScrollAxisVertical   ScrollAxisBit = 1 << 0
	ScrollAxisHorizontal               = 1 << 1
)

type Size

type Size struct {
	W, H uint32
}

Size is a fixed 2D size.

func SizeMax

func SizeMax(a, b Size) Size

SizeMax returns the biggest values of two sizes.

func SizeMin

func SizeMin(a, b Size) Size

SizeMin returns the smallest values of two sizes.

func SurfaceGetSize

func SurfaceGetSize(surface Resource) *Size

SurfaceGetSize gets surface size.

type SurfaceFormat

type SurfaceFormat C.enum_wlc_surface_format

SurfaceFormat defines the format returned by GetTextures.

const (
	// SurfaceRGB defines surface format RGB.
	SurfaceRGB SurfaceFormat = iota
	// SurfaceRGBA defines surface format RGBA.
	SurfaceRGBA
	// SurfaceEGL defines surface format EGL.
	SurfaceEGL
	// SurfaceYUv defines surface format yuv.
	SurfaceYUv
	// SurfaceYUV defines surface format YUV.
	SurfaceYUV
	// SurfaceYXUXV defines surface format YXUXV.
	SurfaceYXUXV
)

type TouchType

type TouchType C.enum_wlc_touch_type
const (
	TouchDown TouchType = iota
	TouchUp
	TouchMotion
	TouchFrame
	TouchCancel
)

type View

type View C.wlc_handle

View is a wlc_handle describing a view object in wlc.

func HandleFromWLSurface

func HandleFromWLSurface(resource *C.struct_wl_resource) View

HandleFromWLSurface returns view handle from wl_surface resource.

func ViewFromSurface

func ViewFromSurface(surface Resource, client *C.struct_wl_client, interf *C.struct_wl_interface, implementation unsafe.Pointer, version, id uint32, userdata unsafe.Pointer) View

ViewFromSurface turns wl_surface into a wlc view. Returns 0 on failure. This will also trigger view.created callback as any view would.

func (View) BringAbove

func (v View) BringAbove(other View)

BringAbove brings view above another view.

func (View) BringToFront

func (v View) BringToFront()

BringToFront brings view to front of everything.

func (View) Close

func (v View) Close()

Close closes view.

func (View) Focus

func (v View) Focus()

Focus focuses view.

func (View) GetAppID

func (v View) GetAppID() string

GetAppID gets app id. (xdg-surface only).

func (View) GetClass

func (v View) GetClass() string

GetClass gets class. (shell-surface only).

func (View) GetGeometry

func (v View) GetGeometry() *Geometry

GetGeometry gets current geometry (what the client sees).

func (View) GetMask

func (v View) GetMask() uint32

GetMask gets current visibility bitmask.

func (View) GetOutput

func (v View) GetOutput() Output

GetOutput gets output of view.

func (View) GetPID

func (v View) GetPID() int

GetPID gets pid of program owning the view.

func (View) GetParent

func (v View) GetParent() View

GetParent gets parent view.

func (View) GetRole

func (v View) GetRole() *C.struct_wl_resource

GetRole returns surface role resource from view handle. Return value will be nil if the view was not assigned role or created with ViewCreateFromSurface().

func (View) GetState

func (v View) GetState() uint32

GetState gets current state bitfield.

func (View) GetSurface

func (v View) GetSurface() Resource

GetSurface returns internal wlc surface from view handle.

func (View) GetType

func (v View) GetType() uint32

GetType gets type bitfield for view.

func (View) GetVisibleGeometry

func (v View) GetVisibleGeometry() Geometry

GetVisibleGeometry gets current visible geometry (what wlc displays).

func (View) GetWlClient

func (v View) GetWlClient() *C.struct_wl_client

GetWlClient returns wlc_client from view.

func (View) Instance

func (v View) Instance() string

Instance gets instance (shell-surface only).

func (View) PositionerGetAnchor

func (v View) PositionerGetAnchor() PositionerAnchorBit

PositionerGetAnchor gets anchor requested by positioner, as defined in xdg-shell v6. Returns default value WLC_BIT_ANCHOR_NONE if view has no valid positioner or if positioner has no anchor set.

func (View) PositionerGetAnchorRect

func (v View) PositionerGetAnchorRect() *Geometry

PositionerGetAnchorRect gets anchor rectangle requested by positioner, as defined in xdg-shell v6. Returns nil if view has no valid positioner.

func (View) PositionerGetConstraintAdjustment

func (v View) PositionerGetConstraintAdjustment() PositionerConstraintAdjustmentBit

PositionerGetConstraintAdjustment gets constraint adjustment requested by positioner, as defined in xdg-shell v6. Returns default value WLC_BIT_CONSTRAINT_ADJUSTMENT_NONE if view has no valid positioner or if positioner has no constraint adjustment set.

func (View) PositionerGetGravity

func (v View) PositionerGetGravity() PositionerGravityBit

PositionerGetGravity gets anchor requested by positioner, as defined in xdg-shell v6. Returns default value WLC_BIT_GRAVITY_NONE if view has no valid positioner or if positioner has no gravity set.

func (View) PositionerGetOffset

func (v View) PositionerGetOffset() *Point

PositionerGetOffset gets offset requested by positioner, as defined in xdg-shell v6. Returns NULL if view has no valid positioner, or default value (0, 0) if positioner has no offset set.

func (View) PositionerGetSize

func (v View) PositionerGetSize() *Size

PositionerGetSize gets size requested by positioner, as defined in xdg-shell v6.

func (View) SendBelow

func (v View) SendBelow(other View)

SendBelow sends view below another view.

func (View) SendToBack

func (v View) SendToBack()

SendToBack sends view behind everything.

func (View) SetGeometry

func (v View) SetGeometry(edges uint32, geometry Geometry)

SetGeometry sets geometry. Set edges if the geometry change is caused by interactive resize.

func (View) SetMask

func (v View) SetMask(mask uint32)

SetMask sets visibility bitmask.

func (View) SetOutput

func (v View) SetOutput(output Output)

SetOutput sets output for view. Alternatively output.SetViews() can be used.

func (View) SetParent

func (v View) SetParent(parent View)

SetParent sets parent view.

func (View) SetState

func (v View) SetState(state ViewStateBit, toggle bool)

SetState sets state bit. Toggle indicates whether it is set or not.

func (View) SetType

func (v View) SetType(typ ViewTypeBit, toggle bool)

SetType sets type bit. TOggle indicates whether it is set or not.

func (View) Title

func (v View) Title() string

Title gets title.

type ViewStateBit

type ViewStateBit C.enum_wlc_view_state_bit

type ViewTypeBit

type ViewTypeBit C.enum_wlc_view_type_bit

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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