added functionality to delete existing partitions before reinstall
Some checks failed
Build / build (push) Failing after 4m53s
Some checks failed
Build / build (push) Failing after 4m53s
This commit is contained in:
@@ -1,491 +0,0 @@
|
||||
// Generated by go-wayland-scanner
|
||||
// https://github.com/yaslama/go-wayland/cmd/go-wayland-scanner
|
||||
// XML file : internal/proto/xml/dwl-ipc-unstable-v2.xml
|
||||
//
|
||||
// dwl_ipc_unstable_v2 Protocol Copyright:
|
||||
|
||||
package dwl_ipc
|
||||
|
||||
import "github.com/yaslama/go-wayland/wayland/client"
|
||||
|
||||
// ZdwlIpcManagerV2InterfaceName is the name of the interface as it appears in the [client.Registry].
|
||||
// It can be used to match the [client.RegistryGlobalEvent.Interface] in the
|
||||
// [Registry.SetGlobalHandler] and can be used in [Registry.Bind] if this applies.
|
||||
const ZdwlIpcManagerV2InterfaceName = "zdwl_ipc_manager_v2"
|
||||
|
||||
// ZdwlIpcManagerV2 : manage dwl state
|
||||
//
|
||||
// This interface is exposed as a global in wl_registry.
|
||||
//
|
||||
// Clients can use this interface to get a dwl_ipc_output.
|
||||
// After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
|
||||
// The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
|
||||
type ZdwlIpcManagerV2 struct {
|
||||
client.BaseProxy
|
||||
tagsHandler ZdwlIpcManagerV2TagsHandlerFunc
|
||||
layoutHandler ZdwlIpcManagerV2LayoutHandlerFunc
|
||||
}
|
||||
|
||||
// NewZdwlIpcManagerV2 : manage dwl state
|
||||
//
|
||||
// This interface is exposed as a global in wl_registry.
|
||||
//
|
||||
// Clients can use this interface to get a dwl_ipc_output.
|
||||
// After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
|
||||
// The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
|
||||
func NewZdwlIpcManagerV2(ctx *client.Context) *ZdwlIpcManagerV2 {
|
||||
zdwlIpcManagerV2 := &ZdwlIpcManagerV2{}
|
||||
ctx.Register(zdwlIpcManagerV2)
|
||||
return zdwlIpcManagerV2
|
||||
}
|
||||
|
||||
// Release : release dwl_ipc_manager
|
||||
//
|
||||
// Indicates that the client will not the dwl_ipc_manager object anymore.
|
||||
// Objects created through this instance are not affected.
|
||||
func (i *ZdwlIpcManagerV2) Release() error {
|
||||
defer i.Context().Unregister(i)
|
||||
const opcode = 0
|
||||
const _reqBufLen = 8
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetOutput : get a dwl_ipc_outout for a wl_output
|
||||
//
|
||||
// Get a dwl_ipc_outout for the specified wl_output.
|
||||
func (i *ZdwlIpcManagerV2) GetOutput(output *client.Output) (*ZdwlIpcOutputV2, error) {
|
||||
id := NewZdwlIpcOutputV2(i.Context())
|
||||
const opcode = 1
|
||||
const _reqBufLen = 8 + 4 + 4
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], id.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], output.ID())
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return id, err
|
||||
}
|
||||
|
||||
// ZdwlIpcManagerV2TagsEvent : Announces tag amount
|
||||
//
|
||||
// This event is sent after binding.
|
||||
// A roundtrip after binding guarantees the client recieved all tags.
|
||||
type ZdwlIpcManagerV2TagsEvent struct {
|
||||
Amount uint32
|
||||
}
|
||||
type ZdwlIpcManagerV2TagsHandlerFunc func(ZdwlIpcManagerV2TagsEvent)
|
||||
|
||||
// SetTagsHandler : sets handler for ZdwlIpcManagerV2TagsEvent
|
||||
func (i *ZdwlIpcManagerV2) SetTagsHandler(f ZdwlIpcManagerV2TagsHandlerFunc) {
|
||||
i.tagsHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcManagerV2LayoutEvent : Announces a layout
|
||||
//
|
||||
// This event is sent after binding.
|
||||
// A roundtrip after binding guarantees the client recieved all layouts.
|
||||
type ZdwlIpcManagerV2LayoutEvent struct {
|
||||
Name string
|
||||
}
|
||||
type ZdwlIpcManagerV2LayoutHandlerFunc func(ZdwlIpcManagerV2LayoutEvent)
|
||||
|
||||
// SetLayoutHandler : sets handler for ZdwlIpcManagerV2LayoutEvent
|
||||
func (i *ZdwlIpcManagerV2) SetLayoutHandler(f ZdwlIpcManagerV2LayoutHandlerFunc) {
|
||||
i.layoutHandler = f
|
||||
}
|
||||
|
||||
func (i *ZdwlIpcManagerV2) Dispatch(opcode uint32, fd int, data []byte) {
|
||||
switch opcode {
|
||||
case 0:
|
||||
if i.tagsHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcManagerV2TagsEvent
|
||||
l := 0
|
||||
e.Amount = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
|
||||
i.tagsHandler(e)
|
||||
case 1:
|
||||
if i.layoutHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcManagerV2LayoutEvent
|
||||
l := 0
|
||||
nameLen := client.PaddedLen(int(client.Uint32(data[l : l+4])))
|
||||
l += 4
|
||||
e.Name = client.String(data[l : l+nameLen])
|
||||
l += nameLen
|
||||
|
||||
i.layoutHandler(e)
|
||||
}
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2InterfaceName is the name of the interface as it appears in the [client.Registry].
|
||||
// It can be used to match the [client.RegistryGlobalEvent.Interface] in the
|
||||
// [Registry.SetGlobalHandler] and can be used in [Registry.Bind] if this applies.
|
||||
const ZdwlIpcOutputV2InterfaceName = "zdwl_ipc_output_v2"
|
||||
|
||||
// ZdwlIpcOutputV2 : control dwl output
|
||||
//
|
||||
// Observe and control a dwl output.
|
||||
//
|
||||
// Events are double-buffered:
|
||||
// Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
|
||||
//
|
||||
// Request are not double-buffered:
|
||||
// The compositor will update immediately upon request.
|
||||
type ZdwlIpcOutputV2 struct {
|
||||
client.BaseProxy
|
||||
toggleVisibilityHandler ZdwlIpcOutputV2ToggleVisibilityHandlerFunc
|
||||
activeHandler ZdwlIpcOutputV2ActiveHandlerFunc
|
||||
tagHandler ZdwlIpcOutputV2TagHandlerFunc
|
||||
layoutHandler ZdwlIpcOutputV2LayoutHandlerFunc
|
||||
titleHandler ZdwlIpcOutputV2TitleHandlerFunc
|
||||
appidHandler ZdwlIpcOutputV2AppidHandlerFunc
|
||||
layoutSymbolHandler ZdwlIpcOutputV2LayoutSymbolHandlerFunc
|
||||
frameHandler ZdwlIpcOutputV2FrameHandlerFunc
|
||||
}
|
||||
|
||||
// NewZdwlIpcOutputV2 : control dwl output
|
||||
//
|
||||
// Observe and control a dwl output.
|
||||
//
|
||||
// Events are double-buffered:
|
||||
// Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
|
||||
//
|
||||
// Request are not double-buffered:
|
||||
// The compositor will update immediately upon request.
|
||||
func NewZdwlIpcOutputV2(ctx *client.Context) *ZdwlIpcOutputV2 {
|
||||
zdwlIpcOutputV2 := &ZdwlIpcOutputV2{}
|
||||
ctx.Register(zdwlIpcOutputV2)
|
||||
return zdwlIpcOutputV2
|
||||
}
|
||||
|
||||
// Release : release dwl_ipc_outout
|
||||
//
|
||||
// Indicates to that the client no longer needs this dwl_ipc_output.
|
||||
func (i *ZdwlIpcOutputV2) Release() error {
|
||||
defer i.Context().Unregister(i)
|
||||
const opcode = 0
|
||||
const _reqBufLen = 8
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// SetTags : Set the active tags of this output
|
||||
//
|
||||
// tagmask: bitmask of the tags that should be set.
|
||||
// toggleTagset: toggle the selected tagset, zero for invalid, nonzero for valid.
|
||||
func (i *ZdwlIpcOutputV2) SetTags(tagmask, toggleTagset uint32) error {
|
||||
const opcode = 1
|
||||
const _reqBufLen = 8 + 4 + 4
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(tagmask))
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(toggleTagset))
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// SetClientTags : Set the tags of the focused client.
|
||||
//
|
||||
// The tags are updated as follows:
|
||||
// new_tags = (current_tags AND and_tags) XOR xor_tags
|
||||
func (i *ZdwlIpcOutputV2) SetClientTags(andTags, xorTags uint32) error {
|
||||
const opcode = 2
|
||||
const _reqBufLen = 8 + 4 + 4
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(andTags))
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(xorTags))
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// SetLayout : Set the layout of this output
|
||||
//
|
||||
// index: index of a layout recieved by dwl_ipc_manager.layout
|
||||
func (i *ZdwlIpcOutputV2) SetLayout(index uint32) error {
|
||||
const opcode = 3
|
||||
const _reqBufLen = 8 + 4
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(index))
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return err
|
||||
}
|
||||
|
||||
type ZdwlIpcOutputV2TagState uint32
|
||||
|
||||
// ZdwlIpcOutputV2TagState :
|
||||
const (
|
||||
// ZdwlIpcOutputV2TagStateNone : no state
|
||||
ZdwlIpcOutputV2TagStateNone ZdwlIpcOutputV2TagState = 0
|
||||
// ZdwlIpcOutputV2TagStateActive : tag is active
|
||||
ZdwlIpcOutputV2TagStateActive ZdwlIpcOutputV2TagState = 1
|
||||
// ZdwlIpcOutputV2TagStateUrgent : tag has at least one urgent client
|
||||
ZdwlIpcOutputV2TagStateUrgent ZdwlIpcOutputV2TagState = 2
|
||||
)
|
||||
|
||||
func (e ZdwlIpcOutputV2TagState) Name() string {
|
||||
switch e {
|
||||
case ZdwlIpcOutputV2TagStateNone:
|
||||
return "none"
|
||||
case ZdwlIpcOutputV2TagStateActive:
|
||||
return "active"
|
||||
case ZdwlIpcOutputV2TagStateUrgent:
|
||||
return "urgent"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func (e ZdwlIpcOutputV2TagState) Value() string {
|
||||
switch e {
|
||||
case ZdwlIpcOutputV2TagStateNone:
|
||||
return "0"
|
||||
case ZdwlIpcOutputV2TagStateActive:
|
||||
return "1"
|
||||
case ZdwlIpcOutputV2TagStateUrgent:
|
||||
return "2"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func (e ZdwlIpcOutputV2TagState) String() string {
|
||||
return e.Name() + "=" + e.Value()
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2ToggleVisibilityEvent : Toggle client visibilty
|
||||
//
|
||||
// Indicates the client should hide or show themselves.
|
||||
// If the client is visible then hide, if hidden then show.
|
||||
type ZdwlIpcOutputV2ToggleVisibilityEvent struct{}
|
||||
type ZdwlIpcOutputV2ToggleVisibilityHandlerFunc func(ZdwlIpcOutputV2ToggleVisibilityEvent)
|
||||
|
||||
// SetToggleVisibilityHandler : sets handler for ZdwlIpcOutputV2ToggleVisibilityEvent
|
||||
func (i *ZdwlIpcOutputV2) SetToggleVisibilityHandler(f ZdwlIpcOutputV2ToggleVisibilityHandlerFunc) {
|
||||
i.toggleVisibilityHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2ActiveEvent : Update the selected output.
|
||||
//
|
||||
// Indicates if the output is active. Zero is invalid, nonzero is valid.
|
||||
type ZdwlIpcOutputV2ActiveEvent struct {
|
||||
Active uint32
|
||||
}
|
||||
type ZdwlIpcOutputV2ActiveHandlerFunc func(ZdwlIpcOutputV2ActiveEvent)
|
||||
|
||||
// SetActiveHandler : sets handler for ZdwlIpcOutputV2ActiveEvent
|
||||
func (i *ZdwlIpcOutputV2) SetActiveHandler(f ZdwlIpcOutputV2ActiveHandlerFunc) {
|
||||
i.activeHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2TagEvent : Update the state of a tag.
|
||||
//
|
||||
// Indicates that a tag has been updated.
|
||||
type ZdwlIpcOutputV2TagEvent struct {
|
||||
Tag uint32
|
||||
State uint32
|
||||
Clients uint32
|
||||
Focused uint32
|
||||
}
|
||||
type ZdwlIpcOutputV2TagHandlerFunc func(ZdwlIpcOutputV2TagEvent)
|
||||
|
||||
// SetTagHandler : sets handler for ZdwlIpcOutputV2TagEvent
|
||||
func (i *ZdwlIpcOutputV2) SetTagHandler(f ZdwlIpcOutputV2TagHandlerFunc) {
|
||||
i.tagHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2LayoutEvent : Update the layout.
|
||||
//
|
||||
// Indicates a new layout is selected.
|
||||
type ZdwlIpcOutputV2LayoutEvent struct {
|
||||
Layout uint32
|
||||
}
|
||||
type ZdwlIpcOutputV2LayoutHandlerFunc func(ZdwlIpcOutputV2LayoutEvent)
|
||||
|
||||
// SetLayoutHandler : sets handler for ZdwlIpcOutputV2LayoutEvent
|
||||
func (i *ZdwlIpcOutputV2) SetLayoutHandler(f ZdwlIpcOutputV2LayoutHandlerFunc) {
|
||||
i.layoutHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2TitleEvent : Update the title.
|
||||
//
|
||||
// Indicates the title has changed.
|
||||
type ZdwlIpcOutputV2TitleEvent struct {
|
||||
Title string
|
||||
}
|
||||
type ZdwlIpcOutputV2TitleHandlerFunc func(ZdwlIpcOutputV2TitleEvent)
|
||||
|
||||
// SetTitleHandler : sets handler for ZdwlIpcOutputV2TitleEvent
|
||||
func (i *ZdwlIpcOutputV2) SetTitleHandler(f ZdwlIpcOutputV2TitleHandlerFunc) {
|
||||
i.titleHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2AppidEvent : Update the appid.
|
||||
//
|
||||
// Indicates the appid has changed.
|
||||
type ZdwlIpcOutputV2AppidEvent struct {
|
||||
Appid string
|
||||
}
|
||||
type ZdwlIpcOutputV2AppidHandlerFunc func(ZdwlIpcOutputV2AppidEvent)
|
||||
|
||||
// SetAppidHandler : sets handler for ZdwlIpcOutputV2AppidEvent
|
||||
func (i *ZdwlIpcOutputV2) SetAppidHandler(f ZdwlIpcOutputV2AppidHandlerFunc) {
|
||||
i.appidHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2LayoutSymbolEvent : Update the current layout symbol
|
||||
//
|
||||
// Indicates the layout has changed. Since layout symbols are dynamic.
|
||||
// As opposed to the zdwl_ipc_manager.layout event, this should take precendence when displaying.
|
||||
// You can ignore the zdwl_ipc_output.layout event.
|
||||
type ZdwlIpcOutputV2LayoutSymbolEvent struct {
|
||||
Layout string
|
||||
}
|
||||
type ZdwlIpcOutputV2LayoutSymbolHandlerFunc func(ZdwlIpcOutputV2LayoutSymbolEvent)
|
||||
|
||||
// SetLayoutSymbolHandler : sets handler for ZdwlIpcOutputV2LayoutSymbolEvent
|
||||
func (i *ZdwlIpcOutputV2) SetLayoutSymbolHandler(f ZdwlIpcOutputV2LayoutSymbolHandlerFunc) {
|
||||
i.layoutSymbolHandler = f
|
||||
}
|
||||
|
||||
// ZdwlIpcOutputV2FrameEvent : The update sequence is done.
|
||||
//
|
||||
// Indicates that a sequence of status updates have finished and the client should redraw.
|
||||
type ZdwlIpcOutputV2FrameEvent struct{}
|
||||
type ZdwlIpcOutputV2FrameHandlerFunc func(ZdwlIpcOutputV2FrameEvent)
|
||||
|
||||
// SetFrameHandler : sets handler for ZdwlIpcOutputV2FrameEvent
|
||||
func (i *ZdwlIpcOutputV2) SetFrameHandler(f ZdwlIpcOutputV2FrameHandlerFunc) {
|
||||
i.frameHandler = f
|
||||
}
|
||||
|
||||
func (i *ZdwlIpcOutputV2) Dispatch(opcode uint32, fd int, data []byte) {
|
||||
switch opcode {
|
||||
case 0:
|
||||
if i.toggleVisibilityHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2ToggleVisibilityEvent
|
||||
|
||||
i.toggleVisibilityHandler(e)
|
||||
case 1:
|
||||
if i.activeHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2ActiveEvent
|
||||
l := 0
|
||||
e.Active = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
|
||||
i.activeHandler(e)
|
||||
case 2:
|
||||
if i.tagHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2TagEvent
|
||||
l := 0
|
||||
e.Tag = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
e.State = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
e.Clients = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
e.Focused = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
|
||||
i.tagHandler(e)
|
||||
case 3:
|
||||
if i.layoutHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2LayoutEvent
|
||||
l := 0
|
||||
e.Layout = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
|
||||
i.layoutHandler(e)
|
||||
case 4:
|
||||
if i.titleHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2TitleEvent
|
||||
l := 0
|
||||
titleLen := client.PaddedLen(int(client.Uint32(data[l : l+4])))
|
||||
l += 4
|
||||
e.Title = client.String(data[l : l+titleLen])
|
||||
l += titleLen
|
||||
|
||||
i.titleHandler(e)
|
||||
case 5:
|
||||
if i.appidHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2AppidEvent
|
||||
l := 0
|
||||
appidLen := client.PaddedLen(int(client.Uint32(data[l : l+4])))
|
||||
l += 4
|
||||
e.Appid = client.String(data[l : l+appidLen])
|
||||
l += appidLen
|
||||
|
||||
i.appidHandler(e)
|
||||
case 6:
|
||||
if i.layoutSymbolHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2LayoutSymbolEvent
|
||||
l := 0
|
||||
layoutLen := client.PaddedLen(int(client.Uint32(data[l : l+4])))
|
||||
l += 4
|
||||
e.Layout = client.String(data[l : l+layoutLen])
|
||||
l += layoutLen
|
||||
|
||||
i.layoutSymbolHandler(e)
|
||||
case 7:
|
||||
if i.frameHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZdwlIpcOutputV2FrameEvent
|
||||
|
||||
i.frameHandler(e)
|
||||
}
|
||||
}
|
||||
@@ -1,268 +0,0 @@
|
||||
// Generated by go-wayland-scanner
|
||||
// https://github.com/yaslama/go-wayland/cmd/go-wayland-scanner
|
||||
// XML file : wayland-protocols/wlr-gamma-control-unstable-v1.xml
|
||||
//
|
||||
// wlr_gamma_control_unstable_v1 Protocol Copyright:
|
||||
//
|
||||
// Copyright © 2015 Giulio camuffo
|
||||
// Copyright © 2018 Simon Ser
|
||||
//
|
||||
// Permission to use, copy, modify, distribute, and sell this
|
||||
// software and its documentation for any purpose is hereby granted
|
||||
// without fee, provided that the above copyright notice appear in
|
||||
// all copies and that both that copyright notice and this permission
|
||||
// notice appear in supporting documentation, and that the name of
|
||||
// the copyright holders not be used in advertising or publicity
|
||||
// pertaining to distribution of the software without specific,
|
||||
// written prior permission. The copyright holders make no
|
||||
// representations about the suitability of this software for any
|
||||
// purpose. It is provided "as is" without express or implied
|
||||
// warranty.
|
||||
//
|
||||
// THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
||||
// SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
// FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
// SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
// AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
// ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
// THIS SOFTWARE.
|
||||
|
||||
package wlr_gamma_control
|
||||
|
||||
import (
|
||||
"github.com/yaslama/go-wayland/wayland/client"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// ZwlrGammaControlManagerV1InterfaceName is the name of the interface as it appears in the [client.Registry].
|
||||
// It can be used to match the [client.RegistryGlobalEvent.Interface] in the
|
||||
// [Registry.SetGlobalHandler] and can be used in [Registry.Bind] if this applies.
|
||||
const ZwlrGammaControlManagerV1InterfaceName = "zwlr_gamma_control_manager_v1"
|
||||
|
||||
// ZwlrGammaControlManagerV1 : manager to create per-output gamma controls
|
||||
//
|
||||
// This interface is a manager that allows creating per-output gamma
|
||||
// controls.
|
||||
type ZwlrGammaControlManagerV1 struct {
|
||||
client.BaseProxy
|
||||
}
|
||||
|
||||
// NewZwlrGammaControlManagerV1 : manager to create per-output gamma controls
|
||||
//
|
||||
// This interface is a manager that allows creating per-output gamma
|
||||
// controls.
|
||||
func NewZwlrGammaControlManagerV1(ctx *client.Context) *ZwlrGammaControlManagerV1 {
|
||||
zwlrGammaControlManagerV1 := &ZwlrGammaControlManagerV1{}
|
||||
ctx.Register(zwlrGammaControlManagerV1)
|
||||
return zwlrGammaControlManagerV1
|
||||
}
|
||||
|
||||
// GetGammaControl : get a gamma control for an output
|
||||
//
|
||||
// Create a gamma control that can be used to adjust gamma tables for the
|
||||
// provided output.
|
||||
func (i *ZwlrGammaControlManagerV1) GetGammaControl(output *client.Output) (*ZwlrGammaControlV1, error) {
|
||||
id := NewZwlrGammaControlV1(i.Context())
|
||||
const opcode = 0
|
||||
const _reqBufLen = 8 + 4 + 4
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], id.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], output.ID())
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return id, err
|
||||
}
|
||||
|
||||
// Destroy : destroy the manager
|
||||
//
|
||||
// All objects created by the manager will still remain valid, until their
|
||||
// appropriate destroy request has been called.
|
||||
func (i *ZwlrGammaControlManagerV1) Destroy() error {
|
||||
defer i.Context().Unregister(i)
|
||||
const opcode = 1
|
||||
const _reqBufLen = 8
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// ZwlrGammaControlV1InterfaceName is the name of the interface as it appears in the [client.Registry].
|
||||
// It can be used to match the [client.RegistryGlobalEvent.Interface] in the
|
||||
// [Registry.SetGlobalHandler] and can be used in [Registry.Bind] if this applies.
|
||||
const ZwlrGammaControlV1InterfaceName = "zwlr_gamma_control_v1"
|
||||
|
||||
// ZwlrGammaControlV1 : adjust gamma tables for an output
|
||||
//
|
||||
// This interface allows a client to adjust gamma tables for a particular
|
||||
// output.
|
||||
//
|
||||
// The client will receive the gamma size, and will then be able to set gamma
|
||||
// tables. At any time the compositor can send a failed event indicating that
|
||||
// this object is no longer valid.
|
||||
//
|
||||
// There can only be at most one gamma control object per output, which
|
||||
// has exclusive access to this particular output. When the gamma control
|
||||
// object is destroyed, the gamma table is restored to its original value.
|
||||
type ZwlrGammaControlV1 struct {
|
||||
client.BaseProxy
|
||||
gammaSizeHandler ZwlrGammaControlV1GammaSizeHandlerFunc
|
||||
failedHandler ZwlrGammaControlV1FailedHandlerFunc
|
||||
}
|
||||
|
||||
// NewZwlrGammaControlV1 : adjust gamma tables for an output
|
||||
//
|
||||
// This interface allows a client to adjust gamma tables for a particular
|
||||
// output.
|
||||
//
|
||||
// The client will receive the gamma size, and will then be able to set gamma
|
||||
// tables. At any time the compositor can send a failed event indicating that
|
||||
// this object is no longer valid.
|
||||
//
|
||||
// There can only be at most one gamma control object per output, which
|
||||
// has exclusive access to this particular output. When the gamma control
|
||||
// object is destroyed, the gamma table is restored to its original value.
|
||||
func NewZwlrGammaControlV1(ctx *client.Context) *ZwlrGammaControlV1 {
|
||||
zwlrGammaControlV1 := &ZwlrGammaControlV1{}
|
||||
ctx.Register(zwlrGammaControlV1)
|
||||
return zwlrGammaControlV1
|
||||
}
|
||||
|
||||
// SetGamma : set the gamma table
|
||||
//
|
||||
// Set the gamma table. The file descriptor can be memory-mapped to provide
|
||||
// the raw gamma table, which contains successive gamma ramps for the red,
|
||||
// green and blue channels. Each gamma ramp is an array of 16-byte unsigned
|
||||
// integers which has the same length as the gamma size.
|
||||
//
|
||||
// The file descriptor data must have the same length as three times the
|
||||
// gamma size.
|
||||
//
|
||||
// fd: gamma table file descriptor
|
||||
func (i *ZwlrGammaControlV1) SetGamma(fd int) error {
|
||||
const opcode = 0
|
||||
const _reqBufLen = 8
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
oob := unix.UnixRights(int(fd))
|
||||
err := i.Context().WriteMsg(_reqBuf[:], oob)
|
||||
return err
|
||||
}
|
||||
|
||||
// Destroy : destroy this control
|
||||
//
|
||||
// Destroys the gamma control object. If the object is still valid, this
|
||||
// restores the original gamma tables.
|
||||
func (i *ZwlrGammaControlV1) Destroy() error {
|
||||
defer i.Context().Unregister(i)
|
||||
const opcode = 1
|
||||
const _reqBufLen = 8
|
||||
var _reqBuf [_reqBufLen]byte
|
||||
l := 0
|
||||
client.PutUint32(_reqBuf[l:4], i.ID())
|
||||
l += 4
|
||||
client.PutUint32(_reqBuf[l:l+4], uint32(_reqBufLen<<16|opcode&0x0000ffff))
|
||||
l += 4
|
||||
err := i.Context().WriteMsg(_reqBuf[:], nil)
|
||||
return err
|
||||
}
|
||||
|
||||
type ZwlrGammaControlV1Error uint32
|
||||
|
||||
// ZwlrGammaControlV1Error :
|
||||
const (
|
||||
// ZwlrGammaControlV1ErrorInvalidGamma : invalid gamma tables
|
||||
ZwlrGammaControlV1ErrorInvalidGamma ZwlrGammaControlV1Error = 1
|
||||
)
|
||||
|
||||
func (e ZwlrGammaControlV1Error) Name() string {
|
||||
switch e {
|
||||
case ZwlrGammaControlV1ErrorInvalidGamma:
|
||||
return "invalid_gamma"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func (e ZwlrGammaControlV1Error) Value() string {
|
||||
switch e {
|
||||
case ZwlrGammaControlV1ErrorInvalidGamma:
|
||||
return "1"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
func (e ZwlrGammaControlV1Error) String() string {
|
||||
return e.Name() + "=" + e.Value()
|
||||
}
|
||||
|
||||
// ZwlrGammaControlV1GammaSizeEvent : size of gamma ramps
|
||||
//
|
||||
// Advertise the size of each gamma ramp.
|
||||
//
|
||||
// This event is sent immediately when the gamma control object is created.
|
||||
type ZwlrGammaControlV1GammaSizeEvent struct {
|
||||
Size uint32
|
||||
}
|
||||
type ZwlrGammaControlV1GammaSizeHandlerFunc func(ZwlrGammaControlV1GammaSizeEvent)
|
||||
|
||||
// SetGammaSizeHandler : sets handler for ZwlrGammaControlV1GammaSizeEvent
|
||||
func (i *ZwlrGammaControlV1) SetGammaSizeHandler(f ZwlrGammaControlV1GammaSizeHandlerFunc) {
|
||||
i.gammaSizeHandler = f
|
||||
}
|
||||
|
||||
// ZwlrGammaControlV1FailedEvent : object no longer valid
|
||||
//
|
||||
// This event indicates that the gamma control is no longer valid. This
|
||||
// can happen for a number of reasons, including:
|
||||
// - The output doesn't support gamma tables
|
||||
// - Setting the gamma tables failed
|
||||
// - Another client already has exclusive gamma control for this output
|
||||
// - The compositor has transferred gamma control to another client
|
||||
//
|
||||
// Upon receiving this event, the client should destroy this object.
|
||||
type ZwlrGammaControlV1FailedEvent struct{}
|
||||
type ZwlrGammaControlV1FailedHandlerFunc func(ZwlrGammaControlV1FailedEvent)
|
||||
|
||||
// SetFailedHandler : sets handler for ZwlrGammaControlV1FailedEvent
|
||||
func (i *ZwlrGammaControlV1) SetFailedHandler(f ZwlrGammaControlV1FailedHandlerFunc) {
|
||||
i.failedHandler = f
|
||||
}
|
||||
|
||||
func (i *ZwlrGammaControlV1) Dispatch(opcode uint32, fd int, data []byte) {
|
||||
switch opcode {
|
||||
case 0:
|
||||
if i.gammaSizeHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZwlrGammaControlV1GammaSizeEvent
|
||||
l := 0
|
||||
e.Size = client.Uint32(data[l : l+4])
|
||||
l += 4
|
||||
|
||||
i.gammaSizeHandler(e)
|
||||
case 1:
|
||||
if i.failedHandler == nil {
|
||||
return
|
||||
}
|
||||
var e ZwlrGammaControlV1FailedEvent
|
||||
|
||||
i.failedHandler(e)
|
||||
}
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This is largely ripped from somebar's ipc patchset; just with some personal modifications.
|
||||
I would probably just submit raphi's patchset but I don't think that would be polite.
|
||||
-->
|
||||
<protocol name="dwl_ipc_unstable_v2">
|
||||
<description summary="inter-proccess-communication about dwl's state">
|
||||
This protocol allows clients to update and get updates from dwl.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible
|
||||
changes may be added together with the corresponding interface
|
||||
version bump.
|
||||
Backward incompatible changes are done by bumping the version
|
||||
number in the protocol and interface names and resetting the
|
||||
interface version. Once the protocol is to be declared stable,
|
||||
the 'z' prefix and the version number in the protocol and
|
||||
interface names are removed and the interface version number is
|
||||
reset.
|
||||
</description>
|
||||
|
||||
<interface name="zdwl_ipc_manager_v2" version="1">
|
||||
<description summary="manage dwl state">
|
||||
This interface is exposed as a global in wl_registry.
|
||||
|
||||
Clients can use this interface to get a dwl_ipc_output.
|
||||
After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
|
||||
The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
|
||||
</description>
|
||||
|
||||
<request name="release" type="destructor">
|
||||
<description summary="release dwl_ipc_manager">
|
||||
Indicates that the client will not the dwl_ipc_manager object anymore.
|
||||
Objects created through this instance are not affected.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_output">
|
||||
<description summary="get a dwl_ipc_outout for a wl_output">
|
||||
Get a dwl_ipc_outout for the specified wl_output.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zdwl_ipc_output_v2"/>
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
</request>
|
||||
|
||||
<event name="tags">
|
||||
<description summary="Announces tag amount">
|
||||
This event is sent after binding.
|
||||
A roundtrip after binding guarantees the client recieved all tags.
|
||||
</description>
|
||||
<arg name="amount" type="uint"/>
|
||||
</event>
|
||||
|
||||
<event name="layout">
|
||||
<description summary="Announces a layout">
|
||||
This event is sent after binding.
|
||||
A roundtrip after binding guarantees the client recieved all layouts.
|
||||
</description>
|
||||
<arg name="name" type="string"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="zdwl_ipc_output_v2" version="1">
|
||||
<description summary="control dwl output">
|
||||
Observe and control a dwl output.
|
||||
|
||||
Events are double-buffered:
|
||||
Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
|
||||
|
||||
Request are not double-buffered:
|
||||
The compositor will update immediately upon request.
|
||||
</description>
|
||||
|
||||
<enum name="tag_state">
|
||||
<entry name="none" value="0" summary="no state"/>
|
||||
<entry name="active" value="1" summary="tag is active"/>
|
||||
<entry name="urgent" value="2" summary="tag has at least one urgent client"/>
|
||||
</enum>
|
||||
|
||||
<request name="release" type="destructor">
|
||||
<description summary="release dwl_ipc_outout">
|
||||
Indicates to that the client no longer needs this dwl_ipc_output.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="toggle_visibility">
|
||||
<description summary="Toggle client visibilty">
|
||||
Indicates the client should hide or show themselves.
|
||||
If the client is visible then hide, if hidden then show.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="active">
|
||||
<description summary="Update the selected output.">
|
||||
Indicates if the output is active. Zero is invalid, nonzero is valid.
|
||||
</description>
|
||||
<arg name="active" type="uint"/>
|
||||
</event>
|
||||
|
||||
<event name="tag">
|
||||
<description summary="Update the state of a tag.">
|
||||
Indicates that a tag has been updated.
|
||||
</description>
|
||||
<arg name="tag" type="uint" summary="Index of the tag"/>
|
||||
<arg name="state" type="uint" enum="tag_state" summary="The state of the tag."/>
|
||||
<arg name="clients" type="uint" summary="The number of clients in the tag."/>
|
||||
<arg name="focused" type="uint" summary="If there is a focused client. Nonzero being valid, zero being invalid."/>
|
||||
</event>
|
||||
|
||||
<event name="layout">
|
||||
<description summary="Update the layout.">
|
||||
Indicates a new layout is selected.
|
||||
</description>
|
||||
<arg name="layout" type="uint" summary="Index of the layout."/>
|
||||
</event>
|
||||
|
||||
<event name="title">
|
||||
<description summary="Update the title.">
|
||||
Indicates the title has changed.
|
||||
</description>
|
||||
<arg name="title" type="string" summary="The new title name."/>
|
||||
</event>
|
||||
|
||||
<event name="appid" since="1">
|
||||
<description summary="Update the appid.">
|
||||
Indicates the appid has changed.
|
||||
</description>
|
||||
<arg name="appid" type="string" summary="The new appid."/>
|
||||
</event>
|
||||
|
||||
<event name="layout_symbol" since="1">
|
||||
<description summary="Update the current layout symbol">
|
||||
Indicates the layout has changed. Since layout symbols are dynamic.
|
||||
As opposed to the zdwl_ipc_manager.layout event, this should take precendence when displaying.
|
||||
You can ignore the zdwl_ipc_output.layout event.
|
||||
</description>
|
||||
<arg name="layout" type="string" summary="The new layout"/>
|
||||
</event>
|
||||
|
||||
<event name="frame">
|
||||
<description summary="The update sequence is done.">
|
||||
Indicates that a sequence of status updates have finished and the client should redraw.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<request name="set_tags">
|
||||
<description summary="Set the active tags of this output"/>
|
||||
<arg name="tagmask" type="uint" summary="bitmask of the tags that should be set."/>
|
||||
<arg name="toggle_tagset" type="uint" summary="toggle the selected tagset, zero for invalid, nonzero for valid."/>
|
||||
</request>
|
||||
|
||||
<request name="set_client_tags">
|
||||
<description summary="Set the tags of the focused client.">
|
||||
The tags are updated as follows:
|
||||
new_tags = (current_tags AND and_tags) XOR xor_tags
|
||||
</description>
|
||||
<arg name="and_tags" type="uint"/>
|
||||
<arg name="xor_tags" type="uint"/>
|
||||
</request>
|
||||
|
||||
<request name="set_layout">
|
||||
<description summary="Set the layout of this output"/>
|
||||
<arg name="index" type="uint" summary="index of a layout recieved by dwl_ipc_manager.layout"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
||||
@@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="wlr_gamma_control_unstable_v1">
|
||||
<copyright>
|
||||
Copyright © 2015 Giulio camuffo
|
||||
Copyright © 2018 Simon Ser
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that copyright notice and this permission
|
||||
notice appear in supporting documentation, and that the name of
|
||||
the copyright holders not be used in advertising or publicity
|
||||
pertaining to distribution of the software without specific,
|
||||
written prior permission. The copyright holders make no
|
||||
representations about the suitability of this software for any
|
||||
purpose. It is provided "as is" without express or implied
|
||||
warranty.
|
||||
|
||||
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="manage gamma tables of outputs">
|
||||
This protocol allows a privileged client to set the gamma tables for
|
||||
outputs.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible changes
|
||||
may be added together with the corresponding interface version bump.
|
||||
Backward incompatible changes are done by bumping the version number in
|
||||
the protocol and interface names and resetting the interface version.
|
||||
Once the protocol is to be declared stable, the 'z' prefix and the
|
||||
version number in the protocol and interface names are removed and the
|
||||
interface version number is reset.
|
||||
</description>
|
||||
|
||||
<interface name="zwlr_gamma_control_manager_v1" version="1">
|
||||
<description summary="manager to create per-output gamma controls">
|
||||
This interface is a manager that allows creating per-output gamma
|
||||
controls.
|
||||
</description>
|
||||
|
||||
<request name="get_gamma_control">
|
||||
<description summary="get a gamma control for an output">
|
||||
Create a gamma control that can be used to adjust gamma tables for the
|
||||
provided output.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwlr_gamma_control_v1"/>
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
</request>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the manager">
|
||||
All objects created by the manager will still remain valid, until their
|
||||
appropriate destroy request has been called.
|
||||
</description>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwlr_gamma_control_v1" version="1">
|
||||
<description summary="adjust gamma tables for an output">
|
||||
This interface allows a client to adjust gamma tables for a particular
|
||||
output.
|
||||
|
||||
The client will receive the gamma size, and will then be able to set gamma
|
||||
tables. At any time the compositor can send a failed event indicating that
|
||||
this object is no longer valid.
|
||||
|
||||
There can only be at most one gamma control object per output, which
|
||||
has exclusive access to this particular output. When the gamma control
|
||||
object is destroyed, the gamma table is restored to its original value.
|
||||
</description>
|
||||
|
||||
<event name="gamma_size">
|
||||
<description summary="size of gamma ramps">
|
||||
Advertise the size of each gamma ramp.
|
||||
|
||||
This event is sent immediately when the gamma control object is created.
|
||||
</description>
|
||||
<arg name="size" type="uint" summary="number of elements in a ramp"/>
|
||||
</event>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="invalid_gamma" value="1" summary="invalid gamma tables"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_gamma">
|
||||
<description summary="set the gamma table">
|
||||
Set the gamma table. The file descriptor can be memory-mapped to provide
|
||||
the raw gamma table, which contains successive gamma ramps for the red,
|
||||
green and blue channels. Each gamma ramp is an array of 16-byte unsigned
|
||||
integers which has the same length as the gamma size.
|
||||
|
||||
The file descriptor data must have the same length as three times the
|
||||
gamma size.
|
||||
</description>
|
||||
<arg name="fd" type="fd" summary="gamma table file descriptor"/>
|
||||
</request>
|
||||
|
||||
<event name="failed">
|
||||
<description summary="object no longer valid">
|
||||
This event indicates that the gamma control is no longer valid. This
|
||||
can happen for a number of reasons, including:
|
||||
- The output doesn't support gamma tables
|
||||
- Setting the gamma tables failed
|
||||
- Another client already has exclusive gamma control for this output
|
||||
- The compositor has transferred gamma control to another client
|
||||
|
||||
Upon receiving this event, the client should destroy this object.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy this control">
|
||||
Destroys the gamma control object. If the object is still valid, this
|
||||
restores the original gamma tables.
|
||||
</description>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
||||
Reference in New Issue
Block a user