1// Code generated by wlgen; DO NOT EDIT.
2package colormanagement
3
4import (
5 "fmt"
6 wayland "github.com/bnema/purego-libwayland/protocol/wayland"
7 "github.com/bnema/purego-libwayland/server"
8 "runtime"
9)
10
11var WpColorManagerV1Interface *server.Interface
12var WpColorManagementOutputV1Interface *server.Interface
13var WpColorManagementSurfaceV1Interface *server.Interface
14var WpColorManagementSurfaceFeedbackV1Interface *server.Interface
15var WpImageDescriptionCreatorIccV1Interface *server.Interface
16var WpImageDescriptionCreatorParamsV1Interface *server.Interface
17var WpImageDescriptionV1Interface *server.Interface
18var WpImageDescriptionInfoV1Interface *server.Interface
19var WpImageDescriptionReferenceV1Interface *server.Interface
20
21func init() {
22 WpColorManagerV1Interface = &server.Interface{Name: "wp_color_manager_v1", Version: 3}
23 WpColorManagementOutputV1Interface = &server.Interface{Name: "wp_color_management_output_v1", Version: 3}
24 WpColorManagementSurfaceV1Interface = &server.Interface{Name: "wp_color_management_surface_v1", Version: 3}
25 WpColorManagementSurfaceFeedbackV1Interface = &server.Interface{Name: "wp_color_management_surface_feedback_v1", Version: 3}
26 WpImageDescriptionCreatorIccV1Interface = &server.Interface{Name: "wp_image_description_creator_icc_v1", Version: 3}
27 WpImageDescriptionCreatorParamsV1Interface = &server.Interface{Name: "wp_image_description_creator_params_v1", Version: 3}
28 WpImageDescriptionV1Interface = &server.Interface{Name: "wp_image_description_v1", Version: 3}
29 WpImageDescriptionInfoV1Interface = &server.Interface{Name: "wp_image_description_info_v1", Version: 3}
30 WpImageDescriptionReferenceV1Interface = &server.Interface{Name: "wp_image_description_reference_v1", Version: 1}
31 WpColorManagerV1Interface.Requests = []server.Message{
32 {Name: "destroy", Signature: "", Types: []*server.Interface{}},
33 {Name: "get_output", Signature: "no", Types: []*server.Interface{WpColorManagementOutputV1Interface, wayland.OutputInterface}},
34 {Name: "get_surface", Signature: "no", Types: []*server.Interface{WpColorManagementSurfaceV1Interface, wayland.SurfaceInterface}},
35 {Name: "get_surface_feedback", Signature: "no", Types: []*server.Interface{WpColorManagementSurfaceFeedbackV1Interface, wayland.SurfaceInterface}},
36 {Name: "create_icc_creator", Signature: "n", Types: []*server.Interface{WpImageDescriptionCreatorIccV1Interface}},
37 {Name: "create_parametric_creator", Signature: "n", Types: []*server.Interface{WpImageDescriptionCreatorParamsV1Interface}},
38 {Name: "create_windows_scrgb", Signature: "n", Types: []*server.Interface{WpImageDescriptionV1Interface}},
39 {Name: "get_image_description", Signature: "2no", Types: []*server.Interface{WpImageDescriptionV1Interface, WpImageDescriptionReferenceV1Interface}},
40 {Name: "create_windows_bt2100", Signature: "3n", Types: []*server.Interface{WpImageDescriptionV1Interface}},
41 }
42 WpColorManagerV1Interface.Events = []server.Message{
43 {Name: "supported_intent", Signature: "u", Types: []*server.Interface{nil}},
44 {Name: "supported_feature", Signature: "u", Types: []*server.Interface{nil}},
45 {Name: "supported_tf_named", Signature: "u", Types: []*server.Interface{nil}},
46 {Name: "supported_primaries_named", Signature: "u", Types: []*server.Interface{nil}},
47 {Name: "done", Signature: "", Types: []*server.Interface{}},
48 }
49 WpColorManagementOutputV1Interface.Requests = []server.Message{
50 {Name: "destroy", Signature: "", Types: []*server.Interface{}},
51 {Name: "get_image_description", Signature: "n", Types: []*server.Interface{WpImageDescriptionV1Interface}},
52 }
53 WpColorManagementOutputV1Interface.Events = []server.Message{
54 {Name: "image_description_changed", Signature: "", Types: []*server.Interface{}},
55 }
56 WpColorManagementSurfaceV1Interface.Requests = []server.Message{
57 {Name: "destroy", Signature: "", Types: []*server.Interface{}},
58 {Name: "set_image_description", Signature: "ou", Types: []*server.Interface{WpImageDescriptionV1Interface, nil}},
59 {Name: "unset_image_description", Signature: "", Types: []*server.Interface{}},
60 }
61 WpColorManagementSurfaceV1Interface.Events = []server.Message{}
62 WpColorManagementSurfaceFeedbackV1Interface.Requests = []server.Message{
63 {Name: "destroy", Signature: "", Types: []*server.Interface{}},
64 {Name: "get_preferred", Signature: "n", Types: []*server.Interface{WpImageDescriptionV1Interface}},
65 {Name: "get_preferred_parametric", Signature: "n", Types: []*server.Interface{WpImageDescriptionV1Interface}},
66 }
67 WpColorManagementSurfaceFeedbackV1Interface.Events = []server.Message{
68 {Name: "preferred_changed", Signature: "u", Types: []*server.Interface{nil}},
69 {Name: "preferred_changed2", Signature: "2uu", Types: []*server.Interface{nil, nil}},
70 }
71 WpImageDescriptionCreatorIccV1Interface.Requests = []server.Message{
72 {Name: "create", Signature: "n", Types: []*server.Interface{WpImageDescriptionV1Interface}},
73 {Name: "set_icc_file", Signature: "huu", Types: []*server.Interface{nil, nil, nil}},
74 }
75 WpImageDescriptionCreatorIccV1Interface.Events = []server.Message{}
76 WpImageDescriptionCreatorParamsV1Interface.Requests = []server.Message{
77 {Name: "create", Signature: "n", Types: []*server.Interface{WpImageDescriptionV1Interface}},
78 {Name: "set_tf_named", Signature: "u", Types: []*server.Interface{nil}},
79 {Name: "set_tf_power", Signature: "u", Types: []*server.Interface{nil}},
80 {Name: "set_primaries_named", Signature: "u", Types: []*server.Interface{nil}},
81 {Name: "set_primaries", Signature: "iiiiiiii", Types: []*server.Interface{nil, nil, nil, nil, nil, nil, nil, nil}},
82 {Name: "set_luminances", Signature: "uuu", Types: []*server.Interface{nil, nil, nil}},
83 {Name: "set_mastering_display_primaries", Signature: "iiiiiiii", Types: []*server.Interface{nil, nil, nil, nil, nil, nil, nil, nil}},
84 {Name: "set_mastering_luminance", Signature: "uu", Types: []*server.Interface{nil, nil}},
85 {Name: "set_max_cll", Signature: "u", Types: []*server.Interface{nil}},
86 {Name: "set_max_fall", Signature: "u", Types: []*server.Interface{nil}},
87 }
88 WpImageDescriptionCreatorParamsV1Interface.Events = []server.Message{}
89 WpImageDescriptionV1Interface.Requests = []server.Message{
90 {Name: "destroy", Signature: "", Types: []*server.Interface{}},
91 {Name: "get_information", Signature: "n", Types: []*server.Interface{WpImageDescriptionInfoV1Interface}},
92 }
93 WpImageDescriptionV1Interface.Events = []server.Message{
94 {Name: "failed", Signature: "us", Types: []*server.Interface{nil, nil}},
95 {Name: "ready", Signature: "u", Types: []*server.Interface{nil}},
96 {Name: "ready2", Signature: "2uu", Types: []*server.Interface{nil, nil}},
97 }
98 WpImageDescriptionInfoV1Interface.Requests = []server.Message{}
99 WpImageDescriptionInfoV1Interface.Events = []server.Message{
100 {Name: "done", Signature: "", Types: []*server.Interface{}},
101 {Name: "icc_file", Signature: "hu", Types: []*server.Interface{nil, nil}},
102 {Name: "primaries", Signature: "iiiiiiii", Types: []*server.Interface{nil, nil, nil, nil, nil, nil, nil, nil}},
103 {Name: "primaries_named", Signature: "u", Types: []*server.Interface{nil}},
104 {Name: "tf_power", Signature: "u", Types: []*server.Interface{nil}},
105 {Name: "tf_named", Signature: "u", Types: []*server.Interface{nil}},
106 {Name: "luminances", Signature: "uuu", Types: []*server.Interface{nil, nil, nil}},
107 {Name: "target_primaries", Signature: "iiiiiiii", Types: []*server.Interface{nil, nil, nil, nil, nil, nil, nil, nil}},
108 {Name: "target_luminance", Signature: "uu", Types: []*server.Interface{nil, nil}},
109 {Name: "target_max_cll", Signature: "u", Types: []*server.Interface{nil}},
110 {Name: "target_max_fall", Signature: "u", Types: []*server.Interface{nil}},
111 }
112 WpImageDescriptionReferenceV1Interface.Requests = []server.Message{
113 {Name: "destroy", Signature: "", Types: []*server.Interface{}},
114 }
115 WpImageDescriptionReferenceV1Interface.Events = []server.Message{}
116 if err := server.NewInterfaces(WpColorManagerV1Interface, WpColorManagementOutputV1Interface, WpColorManagementSurfaceV1Interface, WpColorManagementSurfaceFeedbackV1Interface, WpImageDescriptionCreatorIccV1Interface, WpImageDescriptionCreatorParamsV1Interface, WpImageDescriptionV1Interface, WpImageDescriptionInfoV1Interface, WpImageDescriptionReferenceV1Interface); err != nil {
117 panic(err)
118 }
119}
120
121// WpColorManagerV1 color manager singleton.
122type WpColorManagerV1 struct{ *server.Resource }
123
124func WrapWpColorManagerV1(r *server.Resource) *WpColorManagerV1 {
125 if r == nil {
126 return nil
127 }
128 return &WpColorManagerV1{r}
129}
130
131const WpColorManagerV1RequestDestroy uint32 = 0
132const WpColorManagerV1RequestGetOutput uint32 = 1
133const WpColorManagerV1RequestGetSurface uint32 = 2
134const WpColorManagerV1RequestGetSurfaceFeedback uint32 = 3
135const WpColorManagerV1RequestCreateIccCreator uint32 = 4
136const WpColorManagerV1RequestCreateParametricCreator uint32 = 5
137const WpColorManagerV1RequestCreateWindowsScrgb uint32 = 6
138const WpColorManagerV1RequestGetImageDescription uint32 = 7
139const WpColorManagerV1RequestCreateWindowsBt2100 uint32 = 8
140const WpColorManagerV1EventSupportedIntent uint32 = 0
141const WpColorManagerV1EventSupportedFeature uint32 = 1
142const WpColorManagerV1EventSupportedTfNamed uint32 = 2
143const WpColorManagerV1EventSupportedPrimariesNamed uint32 = 3
144const WpColorManagerV1EventDone uint32 = 4
145
146// WpColorManagerV1Error .
147type WpColorManagerV1Error uint32
148
149const (
150 WpColorManagerV1ErrorUnsupportedFeature WpColorManagerV1Error = 0
151 WpColorManagerV1ErrorSurfaceExists WpColorManagerV1Error = 1
152)
153
154// WpColorManagerV1RenderIntent rendering intents.
155type WpColorManagerV1RenderIntent uint32
156
157const (
158 WpColorManagerV1RenderIntentPerceptual WpColorManagerV1RenderIntent = 0
159 WpColorManagerV1RenderIntentRelative WpColorManagerV1RenderIntent = 1
160 WpColorManagerV1RenderIntentSaturation WpColorManagerV1RenderIntent = 2
161 WpColorManagerV1RenderIntentAbsolute WpColorManagerV1RenderIntent = 3
162 WpColorManagerV1RenderIntentRelativeBpc WpColorManagerV1RenderIntent = 4
163 WpColorManagerV1RenderIntentAbsoluteNoAdaptation WpColorManagerV1RenderIntent = 5
164)
165
166// WpColorManagerV1Feature compositor supported features.
167type WpColorManagerV1Feature uint32
168
169const (
170 WpColorManagerV1FeatureIccV2V4 WpColorManagerV1Feature = 0
171 WpColorManagerV1FeatureParametric WpColorManagerV1Feature = 1
172 WpColorManagerV1FeatureSetPrimaries WpColorManagerV1Feature = 2
173 WpColorManagerV1FeatureSetTfPower WpColorManagerV1Feature = 3
174 WpColorManagerV1FeatureSetLuminances WpColorManagerV1Feature = 4
175 WpColorManagerV1FeatureSetMasteringDisplayPrimaries WpColorManagerV1Feature = 5
176 WpColorManagerV1FeatureExtendedTargetVolume WpColorManagerV1Feature = 6
177 WpColorManagerV1FeatureWindowsScrgb WpColorManagerV1Feature = 7
178 WpColorManagerV1FeatureWindowsBt2100 WpColorManagerV1Feature = 8
179)
180
181// WpColorManagerV1Primaries named color primaries.
182type WpColorManagerV1Primaries uint32
183
184const (
185 WpColorManagerV1PrimariesSrgb WpColorManagerV1Primaries = 1
186 WpColorManagerV1PrimariesPalM WpColorManagerV1Primaries = 2
187 WpColorManagerV1PrimariesPal WpColorManagerV1Primaries = 3
188 WpColorManagerV1PrimariesNtsc WpColorManagerV1Primaries = 4
189 WpColorManagerV1PrimariesGenericFilm WpColorManagerV1Primaries = 5
190 WpColorManagerV1PrimariesBt2020 WpColorManagerV1Primaries = 6
191 WpColorManagerV1PrimariesCie1931Xyz WpColorManagerV1Primaries = 7
192 WpColorManagerV1PrimariesDciP3 WpColorManagerV1Primaries = 8
193 WpColorManagerV1PrimariesDisplayP3 WpColorManagerV1Primaries = 9
194 WpColorManagerV1PrimariesAdobeRgb WpColorManagerV1Primaries = 10
195)
196
197// WpColorManagerV1TransferFunction named transfer functions.
198type WpColorManagerV1TransferFunction uint32
199
200const (
201 WpColorManagerV1TransferFunctionBt1886 WpColorManagerV1TransferFunction = 1
202 WpColorManagerV1TransferFunctionGamma22 WpColorManagerV1TransferFunction = 2
203 WpColorManagerV1TransferFunctionGamma28 WpColorManagerV1TransferFunction = 3
204 WpColorManagerV1TransferFunctionSt240 WpColorManagerV1TransferFunction = 4
205 WpColorManagerV1TransferFunctionExtLinear WpColorManagerV1TransferFunction = 5
206 WpColorManagerV1TransferFunctionLog100 WpColorManagerV1TransferFunction = 6
207 WpColorManagerV1TransferFunctionLog316 WpColorManagerV1TransferFunction = 7
208 WpColorManagerV1TransferFunctionXvycc WpColorManagerV1TransferFunction = 8
209 WpColorManagerV1TransferFunctionSrgb WpColorManagerV1TransferFunction = 9
210 WpColorManagerV1TransferFunctionExtSrgb WpColorManagerV1TransferFunction = 10
211 WpColorManagerV1TransferFunctionSt2084Pq WpColorManagerV1TransferFunction = 11
212 WpColorManagerV1TransferFunctionSt428 WpColorManagerV1TransferFunction = 12
213 WpColorManagerV1TransferFunctionHlg WpColorManagerV1TransferFunction = 13
214 WpColorManagerV1TransferFunctionCompoundPower24 WpColorManagerV1TransferFunction = 14
215)
216
217// WpColorManagerV1Handler handles wp_color_manager_v1 requests.
218type WpColorManagerV1Handler interface {
219 Destroy(self *WpColorManagerV1)
220 GetOutput(self *WpColorManagerV1, id uint32, output *wayland.Output)
221 GetSurface(self *WpColorManagerV1, id uint32, surface *wayland.Surface)
222 GetSurfaceFeedback(self *WpColorManagerV1, id uint32, surface *wayland.Surface)
223 CreateIccCreator(self *WpColorManagerV1, obj uint32)
224 CreateParametricCreator(self *WpColorManagerV1, obj uint32)
225 CreateWindowsScrgb(self *WpColorManagerV1, imageDescription uint32)
226 GetImageDescription(self *WpColorManagerV1, imageDescription uint32, reference *WpImageDescriptionReferenceV1)
227 CreateWindowsBt2100(self *WpColorManagerV1, imageDescription uint32)
228}
229
230func NewWpColorManagerV1(c server.Client, version int32, id uint32, h WpColorManagerV1Handler) (*WpColorManagerV1, error) {
231 if h == nil {
232 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_color_manager_v1")
233 }
234 var self *WpColorManagerV1
235 r, err := c.CreateResource(WpColorManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
236 switch opcode {
237 case 0:
238 h.Destroy(self)
239 self.Destroy()
240 case 1:
241 h.GetOutput(self, args[0].NewID(), wayland.WrapOutput(args[1].Resource()))
242 case 2:
243 h.GetSurface(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
244 case 3:
245 h.GetSurfaceFeedback(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
246 case 4:
247 h.CreateIccCreator(self, args[0].NewID())
248 case 5:
249 h.CreateParametricCreator(self, args[0].NewID())
250 case 6:
251 h.CreateWindowsScrgb(self, args[0].NewID())
252 case 7:
253 h.GetImageDescription(self, args[0].NewID(), WrapWpImageDescriptionReferenceV1(args[1].Resource()))
254 case 8:
255 h.CreateWindowsBt2100(self, args[0].NewID())
256 }
257 })
258 if err != nil {
259 return nil, err
260 }
261 self = WrapWpColorManagerV1(r)
262 r.Data = self
263 return self, nil
264}
265
266// SendSupportedIntent supported rendering intent.
267func (self *WpColorManagerV1) SendSupportedIntent(renderIntent uint32) {
268 self.PostEvent(WpColorManagerV1EventSupportedIntent, server.Uint(renderIntent))
269}
270
271// SendSupportedFeature supported features.
272func (self *WpColorManagerV1) SendSupportedFeature(feature uint32) {
273 self.PostEvent(WpColorManagerV1EventSupportedFeature, server.Uint(feature))
274}
275
276// SendSupportedTfNamed supported named transfer characteristic.
277func (self *WpColorManagerV1) SendSupportedTfNamed(tf uint32) {
278 self.PostEvent(WpColorManagerV1EventSupportedTfNamed, server.Uint(tf))
279}
280
281// SendSupportedPrimariesNamed supported named primaries.
282func (self *WpColorManagerV1) SendSupportedPrimariesNamed(primaries uint32) {
283 self.PostEvent(WpColorManagerV1EventSupportedPrimariesNamed, server.Uint(primaries))
284}
285
286// SendDone all features have been sent.
287func (self *WpColorManagerV1) SendDone() {
288 self.PostEvent(WpColorManagerV1EventDone)
289}
290func NewWpColorManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
291 return d.CreateGlobal(WpColorManagerV1Interface, version, bind)
292}
293
294// WpColorManagementOutputV1 output color properties.
295type WpColorManagementOutputV1 struct{ *server.Resource }
296
297func WrapWpColorManagementOutputV1(r *server.Resource) *WpColorManagementOutputV1 {
298 if r == nil {
299 return nil
300 }
301 return &WpColorManagementOutputV1{r}
302}
303
304const WpColorManagementOutputV1RequestDestroy uint32 = 0
305const WpColorManagementOutputV1RequestGetImageDescription uint32 = 1
306const WpColorManagementOutputV1EventImageDescriptionChanged uint32 = 0
307
308// WpColorManagementOutputV1Handler handles wp_color_management_output_v1 requests.
309type WpColorManagementOutputV1Handler interface {
310 Destroy(self *WpColorManagementOutputV1)
311 GetImageDescription(self *WpColorManagementOutputV1, imageDescription uint32)
312}
313
314func NewWpColorManagementOutputV1(c server.Client, version int32, id uint32, h WpColorManagementOutputV1Handler) (*WpColorManagementOutputV1, error) {
315 if h == nil {
316 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_color_management_output_v1")
317 }
318 var self *WpColorManagementOutputV1
319 r, err := c.CreateResource(WpColorManagementOutputV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
320 switch opcode {
321 case 0:
322 h.Destroy(self)
323 self.Destroy()
324 case 1:
325 h.GetImageDescription(self, args[0].NewID())
326 }
327 })
328 if err != nil {
329 return nil, err
330 }
331 self = WrapWpColorManagementOutputV1(r)
332 r.Data = self
333 return self, nil
334}
335
336// SendImageDescriptionChanged image description changed.
337func (self *WpColorManagementOutputV1) SendImageDescriptionChanged() {
338 self.PostEvent(WpColorManagementOutputV1EventImageDescriptionChanged)
339}
340func NewWpColorManagementOutputV1Global(d *server.Display, version int32, bind server.BindFunc) error {
341 return d.CreateGlobal(WpColorManagementOutputV1Interface, version, bind)
342}
343
344// WpColorManagementSurfaceV1 color management extension to a surface.
345type WpColorManagementSurfaceV1 struct{ *server.Resource }
346
347func WrapWpColorManagementSurfaceV1(r *server.Resource) *WpColorManagementSurfaceV1 {
348 if r == nil {
349 return nil
350 }
351 return &WpColorManagementSurfaceV1{r}
352}
353
354const WpColorManagementSurfaceV1RequestDestroy uint32 = 0
355const WpColorManagementSurfaceV1RequestSetImageDescription uint32 = 1
356const WpColorManagementSurfaceV1RequestUnsetImageDescription uint32 = 2
357
358// WpColorManagementSurfaceV1Error protocol errors.
359type WpColorManagementSurfaceV1Error uint32
360
361const (
362 WpColorManagementSurfaceV1ErrorRenderIntent WpColorManagementSurfaceV1Error = 0
363 WpColorManagementSurfaceV1ErrorImageDescription WpColorManagementSurfaceV1Error = 1
364 WpColorManagementSurfaceV1ErrorInert WpColorManagementSurfaceV1Error = 2
365)
366
367// WpColorManagementSurfaceV1Handler handles wp_color_management_surface_v1 requests.
368type WpColorManagementSurfaceV1Handler interface {
369 Destroy(self *WpColorManagementSurfaceV1)
370 SetImageDescription(self *WpColorManagementSurfaceV1, imageDescription *WpImageDescriptionV1, renderIntent uint32)
371 UnsetImageDescription(self *WpColorManagementSurfaceV1)
372}
373
374func NewWpColorManagementSurfaceV1(c server.Client, version int32, id uint32, h WpColorManagementSurfaceV1Handler) (*WpColorManagementSurfaceV1, error) {
375 if h == nil {
376 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_color_management_surface_v1")
377 }
378 var self *WpColorManagementSurfaceV1
379 r, err := c.CreateResource(WpColorManagementSurfaceV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
380 switch opcode {
381 case 0:
382 h.Destroy(self)
383 self.Destroy()
384 case 1:
385 h.SetImageDescription(self, WrapWpImageDescriptionV1(args[0].Resource()), args[1].Uint())
386 case 2:
387 h.UnsetImageDescription(self)
388 }
389 })
390 if err != nil {
391 return nil, err
392 }
393 self = WrapWpColorManagementSurfaceV1(r)
394 r.Data = self
395 return self, nil
396}
397func NewWpColorManagementSurfaceV1Global(d *server.Display, version int32, bind server.BindFunc) error {
398 return d.CreateGlobal(WpColorManagementSurfaceV1Interface, version, bind)
399}
400
401// WpColorManagementSurfaceFeedbackV1 color management extension to a surface.
402type WpColorManagementSurfaceFeedbackV1 struct{ *server.Resource }
403
404func WrapWpColorManagementSurfaceFeedbackV1(r *server.Resource) *WpColorManagementSurfaceFeedbackV1 {
405 if r == nil {
406 return nil
407 }
408 return &WpColorManagementSurfaceFeedbackV1{r}
409}
410
411const WpColorManagementSurfaceFeedbackV1RequestDestroy uint32 = 0
412const WpColorManagementSurfaceFeedbackV1RequestGetPreferred uint32 = 1
413const WpColorManagementSurfaceFeedbackV1RequestGetPreferredParametric uint32 = 2
414const WpColorManagementSurfaceFeedbackV1EventPreferredChanged uint32 = 0
415const WpColorManagementSurfaceFeedbackV1EventPreferredChanged2 uint32 = 1
416
417// WpColorManagementSurfaceFeedbackV1Error protocol errors.
418type WpColorManagementSurfaceFeedbackV1Error uint32
419
420const (
421 WpColorManagementSurfaceFeedbackV1ErrorInert WpColorManagementSurfaceFeedbackV1Error = 0
422 WpColorManagementSurfaceFeedbackV1ErrorUnsupportedFeature WpColorManagementSurfaceFeedbackV1Error = 1
423)
424
425// WpColorManagementSurfaceFeedbackV1Handler handles wp_color_management_surface_feedback_v1 requests.
426type WpColorManagementSurfaceFeedbackV1Handler interface {
427 Destroy(self *WpColorManagementSurfaceFeedbackV1)
428 GetPreferred(self *WpColorManagementSurfaceFeedbackV1, imageDescription uint32)
429 GetPreferredParametric(self *WpColorManagementSurfaceFeedbackV1, imageDescription uint32)
430}
431
432func NewWpColorManagementSurfaceFeedbackV1(c server.Client, version int32, id uint32, h WpColorManagementSurfaceFeedbackV1Handler) (*WpColorManagementSurfaceFeedbackV1, error) {
433 if h == nil {
434 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_color_management_surface_feedback_v1")
435 }
436 var self *WpColorManagementSurfaceFeedbackV1
437 r, err := c.CreateResource(WpColorManagementSurfaceFeedbackV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
438 switch opcode {
439 case 0:
440 h.Destroy(self)
441 self.Destroy()
442 case 1:
443 h.GetPreferred(self, args[0].NewID())
444 case 2:
445 h.GetPreferredParametric(self, args[0].NewID())
446 }
447 })
448 if err != nil {
449 return nil, err
450 }
451 self = WrapWpColorManagementSurfaceFeedbackV1(r)
452 r.Data = self
453 return self, nil
454}
455
456// SendPreferredChanged the preferred image description changed (32-bit).
457func (self *WpColorManagementSurfaceFeedbackV1) SendPreferredChanged(identity uint32) {
458 self.PostEvent(WpColorManagementSurfaceFeedbackV1EventPreferredChanged, server.Uint(identity))
459}
460
461// SendPreferredChanged2 the preferred image description changed (since version 2).
462func (self *WpColorManagementSurfaceFeedbackV1) SendPreferredChanged2(identityHi uint32, identityLo uint32) {
463 self.PostEvent(WpColorManagementSurfaceFeedbackV1EventPreferredChanged2, server.Uint(identityHi), server.Uint(identityLo))
464}
465func NewWpColorManagementSurfaceFeedbackV1Global(d *server.Display, version int32, bind server.BindFunc) error {
466 return d.CreateGlobal(WpColorManagementSurfaceFeedbackV1Interface, version, bind)
467}
468
469// WpImageDescriptionCreatorIccV1 holder of image description ICC information.
470type WpImageDescriptionCreatorIccV1 struct{ *server.Resource }
471
472func WrapWpImageDescriptionCreatorIccV1(r *server.Resource) *WpImageDescriptionCreatorIccV1 {
473 if r == nil {
474 return nil
475 }
476 return &WpImageDescriptionCreatorIccV1{r}
477}
478
479const WpImageDescriptionCreatorIccV1RequestCreate uint32 = 0
480const WpImageDescriptionCreatorIccV1RequestSetIccFile uint32 = 1
481
482// WpImageDescriptionCreatorIccV1Error protocol errors.
483type WpImageDescriptionCreatorIccV1Error uint32
484
485const (
486 WpImageDescriptionCreatorIccV1ErrorIncompleteSet WpImageDescriptionCreatorIccV1Error = 0
487 WpImageDescriptionCreatorIccV1ErrorAlreadySet WpImageDescriptionCreatorIccV1Error = 1
488 WpImageDescriptionCreatorIccV1ErrorBadFd WpImageDescriptionCreatorIccV1Error = 2
489 WpImageDescriptionCreatorIccV1ErrorBadSize WpImageDescriptionCreatorIccV1Error = 3
490 WpImageDescriptionCreatorIccV1ErrorOutOfFile WpImageDescriptionCreatorIccV1Error = 4
491)
492
493// WpImageDescriptionCreatorIccV1Handler handles wp_image_description_creator_icc_v1 requests.
494type WpImageDescriptionCreatorIccV1Handler interface {
495 Create(self *WpImageDescriptionCreatorIccV1, imageDescription uint32)
496 SetIccFile(self *WpImageDescriptionCreatorIccV1, iccProfile int, offset uint32, length uint32)
497}
498
499func NewWpImageDescriptionCreatorIccV1(c server.Client, version int32, id uint32, h WpImageDescriptionCreatorIccV1Handler) (*WpImageDescriptionCreatorIccV1, error) {
500 if h == nil {
501 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_image_description_creator_icc_v1")
502 }
503 var self *WpImageDescriptionCreatorIccV1
504 r, err := c.CreateResource(WpImageDescriptionCreatorIccV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
505 switch opcode {
506 case 0:
507 h.Create(self, args[0].NewID())
508 self.Destroy()
509 case 1:
510 h.SetIccFile(self, args[0].Fd(), args[1].Uint(), args[2].Uint())
511 }
512 })
513 if err != nil {
514 return nil, err
515 }
516 self = WrapWpImageDescriptionCreatorIccV1(r)
517 r.Data = self
518 return self, nil
519}
520func NewWpImageDescriptionCreatorIccV1Global(d *server.Display, version int32, bind server.BindFunc) error {
521 return d.CreateGlobal(WpImageDescriptionCreatorIccV1Interface, version, bind)
522}
523
524// WpImageDescriptionCreatorParamsV1 holder of image description parameters.
525type WpImageDescriptionCreatorParamsV1 struct{ *server.Resource }
526
527func WrapWpImageDescriptionCreatorParamsV1(r *server.Resource) *WpImageDescriptionCreatorParamsV1 {
528 if r == nil {
529 return nil
530 }
531 return &WpImageDescriptionCreatorParamsV1{r}
532}
533
534const WpImageDescriptionCreatorParamsV1RequestCreate uint32 = 0
535const WpImageDescriptionCreatorParamsV1RequestSetTfNamed uint32 = 1
536const WpImageDescriptionCreatorParamsV1RequestSetTfPower uint32 = 2
537const WpImageDescriptionCreatorParamsV1RequestSetPrimariesNamed uint32 = 3
538const WpImageDescriptionCreatorParamsV1RequestSetPrimaries uint32 = 4
539const WpImageDescriptionCreatorParamsV1RequestSetLuminances uint32 = 5
540const WpImageDescriptionCreatorParamsV1RequestSetMasteringDisplayPrimaries uint32 = 6
541const WpImageDescriptionCreatorParamsV1RequestSetMasteringLuminance uint32 = 7
542const WpImageDescriptionCreatorParamsV1RequestSetMaxCll uint32 = 8
543const WpImageDescriptionCreatorParamsV1RequestSetMaxFall uint32 = 9
544
545// WpImageDescriptionCreatorParamsV1Error protocol errors.
546type WpImageDescriptionCreatorParamsV1Error uint32
547
548const (
549 WpImageDescriptionCreatorParamsV1ErrorIncompleteSet WpImageDescriptionCreatorParamsV1Error = 0
550 WpImageDescriptionCreatorParamsV1ErrorAlreadySet WpImageDescriptionCreatorParamsV1Error = 1
551 WpImageDescriptionCreatorParamsV1ErrorUnsupportedFeature WpImageDescriptionCreatorParamsV1Error = 2
552 WpImageDescriptionCreatorParamsV1ErrorInvalidTf WpImageDescriptionCreatorParamsV1Error = 3
553 WpImageDescriptionCreatorParamsV1ErrorInvalidPrimariesNamed WpImageDescriptionCreatorParamsV1Error = 4
554 WpImageDescriptionCreatorParamsV1ErrorInvalidLuminance WpImageDescriptionCreatorParamsV1Error = 5
555)
556
557// WpImageDescriptionCreatorParamsV1Handler handles wp_image_description_creator_params_v1 requests.
558type WpImageDescriptionCreatorParamsV1Handler interface {
559 Create(self *WpImageDescriptionCreatorParamsV1, imageDescription uint32)
560 SetTfNamed(self *WpImageDescriptionCreatorParamsV1, tf uint32)
561 SetTfPower(self *WpImageDescriptionCreatorParamsV1, eexp uint32)
562 SetPrimariesNamed(self *WpImageDescriptionCreatorParamsV1, primaries uint32)
563 SetPrimaries(self *WpImageDescriptionCreatorParamsV1, rX int32, rY int32, gX int32, gY int32, bX int32, bY int32, wX int32, wY int32)
564 SetLuminances(self *WpImageDescriptionCreatorParamsV1, minLum uint32, maxLum uint32, referenceLum uint32)
565 SetMasteringDisplayPrimaries(self *WpImageDescriptionCreatorParamsV1, rX int32, rY int32, gX int32, gY int32, bX int32, bY int32, wX int32, wY int32)
566 SetMasteringLuminance(self *WpImageDescriptionCreatorParamsV1, minLum uint32, maxLum uint32)
567 SetMaxCll(self *WpImageDescriptionCreatorParamsV1, maxCll uint32)
568 SetMaxFall(self *WpImageDescriptionCreatorParamsV1, maxFall uint32)
569}
570
571func NewWpImageDescriptionCreatorParamsV1(c server.Client, version int32, id uint32, h WpImageDescriptionCreatorParamsV1Handler) (*WpImageDescriptionCreatorParamsV1, error) {
572 if h == nil {
573 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_image_description_creator_params_v1")
574 }
575 var self *WpImageDescriptionCreatorParamsV1
576 r, err := c.CreateResource(WpImageDescriptionCreatorParamsV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
577 switch opcode {
578 case 0:
579 h.Create(self, args[0].NewID())
580 self.Destroy()
581 case 1:
582 h.SetTfNamed(self, args[0].Uint())
583 case 2:
584 h.SetTfPower(self, args[0].Uint())
585 case 3:
586 h.SetPrimariesNamed(self, args[0].Uint())
587 case 4:
588 h.SetPrimaries(self, args[0].Int(), args[1].Int(), args[2].Int(), args[3].Int(), args[4].Int(), args[5].Int(), args[6].Int(), args[7].Int())
589 case 5:
590 h.SetLuminances(self, args[0].Uint(), args[1].Uint(), args[2].Uint())
591 case 6:
592 h.SetMasteringDisplayPrimaries(self, args[0].Int(), args[1].Int(), args[2].Int(), args[3].Int(), args[4].Int(), args[5].Int(), args[6].Int(), args[7].Int())
593 case 7:
594 h.SetMasteringLuminance(self, args[0].Uint(), args[1].Uint())
595 case 8:
596 h.SetMaxCll(self, args[0].Uint())
597 case 9:
598 h.SetMaxFall(self, args[0].Uint())
599 }
600 })
601 if err != nil {
602 return nil, err
603 }
604 self = WrapWpImageDescriptionCreatorParamsV1(r)
605 r.Data = self
606 return self, nil
607}
608func NewWpImageDescriptionCreatorParamsV1Global(d *server.Display, version int32, bind server.BindFunc) error {
609 return d.CreateGlobal(WpImageDescriptionCreatorParamsV1Interface, version, bind)
610}
611
612// WpImageDescriptionV1 Colorimetric image description.
613type WpImageDescriptionV1 struct{ *server.Resource }
614
615func WrapWpImageDescriptionV1(r *server.Resource) *WpImageDescriptionV1 {
616 if r == nil {
617 return nil
618 }
619 return &WpImageDescriptionV1{r}
620}
621
622const WpImageDescriptionV1RequestDestroy uint32 = 0
623const WpImageDescriptionV1RequestGetInformation uint32 = 1
624const WpImageDescriptionV1EventFailed uint32 = 0
625const WpImageDescriptionV1EventReady uint32 = 1
626const WpImageDescriptionV1EventReady2 uint32 = 2
627
628// WpImageDescriptionV1Error protocol errors.
629type WpImageDescriptionV1Error uint32
630
631const (
632 WpImageDescriptionV1ErrorNotReady WpImageDescriptionV1Error = 0
633 WpImageDescriptionV1ErrorNoInformation WpImageDescriptionV1Error = 1
634)
635
636// WpImageDescriptionV1Cause generic reason for failure.
637type WpImageDescriptionV1Cause uint32
638
639const (
640 WpImageDescriptionV1CauseLowVersion WpImageDescriptionV1Cause = 0
641 WpImageDescriptionV1CauseUnsupported WpImageDescriptionV1Cause = 1
642 WpImageDescriptionV1CauseOperatingSystem WpImageDescriptionV1Cause = 2
643 WpImageDescriptionV1CauseNoOutput WpImageDescriptionV1Cause = 3
644)
645
646// WpImageDescriptionV1Handler handles wp_image_description_v1 requests.
647type WpImageDescriptionV1Handler interface {
648 Destroy(self *WpImageDescriptionV1)
649 GetInformation(self *WpImageDescriptionV1, information uint32)
650}
651
652func NewWpImageDescriptionV1(c server.Client, version int32, id uint32, h WpImageDescriptionV1Handler) (*WpImageDescriptionV1, error) {
653 if h == nil {
654 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_image_description_v1")
655 }
656 var self *WpImageDescriptionV1
657 r, err := c.CreateResource(WpImageDescriptionV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
658 switch opcode {
659 case 0:
660 h.Destroy(self)
661 self.Destroy()
662 case 1:
663 h.GetInformation(self, args[0].NewID())
664 }
665 })
666 if err != nil {
667 return nil, err
668 }
669 self = WrapWpImageDescriptionV1(r)
670 r.Data = self
671 return self, nil
672}
673
674// SendFailed graceful error on creating the image description.
675func (self *WpImageDescriptionV1) SendFailed(cause uint32, msg string) {
676 var p runtime.Pinner
677 defer p.Unpin()
678 self.PostEvent(WpImageDescriptionV1EventFailed, server.Uint(cause), server.String(&p, msg, false))
679}
680
681// SendReady the object is ready to be used (32-bit).
682func (self *WpImageDescriptionV1) SendReady(identity uint32) {
683 self.PostEvent(WpImageDescriptionV1EventReady, server.Uint(identity))
684}
685
686// SendReady2 the object is ready to be used (since version 2).
687func (self *WpImageDescriptionV1) SendReady2(identityHi uint32, identityLo uint32) {
688 self.PostEvent(WpImageDescriptionV1EventReady2, server.Uint(identityHi), server.Uint(identityLo))
689}
690func NewWpImageDescriptionV1Global(d *server.Display, version int32, bind server.BindFunc) error {
691 return d.CreateGlobal(WpImageDescriptionV1Interface, version, bind)
692}
693
694// WpImageDescriptionInfoV1 Colorimetric image description information.
695type WpImageDescriptionInfoV1 struct{ *server.Resource }
696
697func WrapWpImageDescriptionInfoV1(r *server.Resource) *WpImageDescriptionInfoV1 {
698 if r == nil {
699 return nil
700 }
701 return &WpImageDescriptionInfoV1{r}
702}
703
704const WpImageDescriptionInfoV1EventDone uint32 = 0
705const WpImageDescriptionInfoV1EventIccFile uint32 = 1
706const WpImageDescriptionInfoV1EventPrimaries uint32 = 2
707const WpImageDescriptionInfoV1EventPrimariesNamed uint32 = 3
708const WpImageDescriptionInfoV1EventTfPower uint32 = 4
709const WpImageDescriptionInfoV1EventTfNamed uint32 = 5
710const WpImageDescriptionInfoV1EventLuminances uint32 = 6
711const WpImageDescriptionInfoV1EventTargetPrimaries uint32 = 7
712const WpImageDescriptionInfoV1EventTargetLuminance uint32 = 8
713const WpImageDescriptionInfoV1EventTargetMaxCll uint32 = 9
714const WpImageDescriptionInfoV1EventTargetMaxFall uint32 = 10
715
716// WpImageDescriptionInfoV1Handler handles wp_image_description_info_v1 requests.
717type WpImageDescriptionInfoV1Handler interface {
718}
719
720func NewWpImageDescriptionInfoV1(c server.Client, version int32, id uint32, h WpImageDescriptionInfoV1Handler) (*WpImageDescriptionInfoV1, error) {
721 var self *WpImageDescriptionInfoV1
722 r, err := c.CreateResource(WpImageDescriptionInfoV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
723 switch opcode {
724 }
725 })
726 if err != nil {
727 return nil, err
728 }
729 self = WrapWpImageDescriptionInfoV1(r)
730 r.Data = self
731 return self, nil
732}
733
734// SendDone end of information.
735func (self *WpImageDescriptionInfoV1) SendDone() {
736 self.PostEvent(WpImageDescriptionInfoV1EventDone)
737}
738
739// SendIccFile ICC profile matching the image description.
740func (self *WpImageDescriptionInfoV1) SendIccFile(icc int, iccSize uint32) {
741 self.PostEvent(WpImageDescriptionInfoV1EventIccFile, server.Fd(icc), server.Uint(iccSize))
742}
743
744// SendPrimaries primaries as chromaticity coordinates.
745func (self *WpImageDescriptionInfoV1) SendPrimaries(rX int32, rY int32, gX int32, gY int32, bX int32, bY int32, wX int32, wY int32) {
746 self.PostEvent(WpImageDescriptionInfoV1EventPrimaries, server.Int(rX), server.Int(rY), server.Int(gX), server.Int(gY), server.Int(bX), server.Int(bY), server.Int(wX), server.Int(wY))
747}
748
749// SendPrimariesNamed named primaries.
750func (self *WpImageDescriptionInfoV1) SendPrimariesNamed(primaries uint32) {
751 self.PostEvent(WpImageDescriptionInfoV1EventPrimariesNamed, server.Uint(primaries))
752}
753
754// SendTfPower transfer characteristic as a power curve.
755func (self *WpImageDescriptionInfoV1) SendTfPower(eexp uint32) {
756 self.PostEvent(WpImageDescriptionInfoV1EventTfPower, server.Uint(eexp))
757}
758
759// SendTfNamed named transfer characteristic.
760func (self *WpImageDescriptionInfoV1) SendTfNamed(tf uint32) {
761 self.PostEvent(WpImageDescriptionInfoV1EventTfNamed, server.Uint(tf))
762}
763
764// SendLuminances primary color volume luminance range and reference white.
765func (self *WpImageDescriptionInfoV1) SendLuminances(minLum uint32, maxLum uint32, referenceLum uint32) {
766 self.PostEvent(WpImageDescriptionInfoV1EventLuminances, server.Uint(minLum), server.Uint(maxLum), server.Uint(referenceLum))
767}
768
769// SendTargetPrimaries target primaries as chromaticity coordinates.
770func (self *WpImageDescriptionInfoV1) SendTargetPrimaries(rX int32, rY int32, gX int32, gY int32, bX int32, bY int32, wX int32, wY int32) {
771 self.PostEvent(WpImageDescriptionInfoV1EventTargetPrimaries, server.Int(rX), server.Int(rY), server.Int(gX), server.Int(gY), server.Int(bX), server.Int(bY), server.Int(wX), server.Int(wY))
772}
773
774// SendTargetLuminance target luminance range.
775func (self *WpImageDescriptionInfoV1) SendTargetLuminance(minLum uint32, maxLum uint32) {
776 self.PostEvent(WpImageDescriptionInfoV1EventTargetLuminance, server.Uint(minLum), server.Uint(maxLum))
777}
778
779// SendTargetMaxCll target maximum content light level.
780func (self *WpImageDescriptionInfoV1) SendTargetMaxCll(maxCll uint32) {
781 self.PostEvent(WpImageDescriptionInfoV1EventTargetMaxCll, server.Uint(maxCll))
782}
783
784// SendTargetMaxFall target maximum frame-average light level.
785func (self *WpImageDescriptionInfoV1) SendTargetMaxFall(maxFall uint32) {
786 self.PostEvent(WpImageDescriptionInfoV1EventTargetMaxFall, server.Uint(maxFall))
787}
788func NewWpImageDescriptionInfoV1Global(d *server.Display, version int32, bind server.BindFunc) error {
789 return d.CreateGlobal(WpImageDescriptionInfoV1Interface, version, bind)
790}
791
792// WpImageDescriptionReferenceV1 Reference to an image description.
793type WpImageDescriptionReferenceV1 struct{ *server.Resource }
794
795func WrapWpImageDescriptionReferenceV1(r *server.Resource) *WpImageDescriptionReferenceV1 {
796 if r == nil {
797 return nil
798 }
799 return &WpImageDescriptionReferenceV1{r}
800}
801
802const WpImageDescriptionReferenceV1RequestDestroy uint32 = 0
803
804// WpImageDescriptionReferenceV1Handler handles wp_image_description_reference_v1 requests.
805type WpImageDescriptionReferenceV1Handler interface {
806 Destroy(self *WpImageDescriptionReferenceV1)
807}
808
809func NewWpImageDescriptionReferenceV1(c server.Client, version int32, id uint32, h WpImageDescriptionReferenceV1Handler) (*WpImageDescriptionReferenceV1, error) {
810 if h == nil {
811 return nil, fmt.Errorf("purego-libwayland: nil handler for wp_image_description_reference_v1")
812 }
813 var self *WpImageDescriptionReferenceV1
814 r, err := c.CreateResource(WpImageDescriptionReferenceV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
815 switch opcode {
816 case 0:
817 h.Destroy(self)
818 self.Destroy()
819 }
820 })
821 if err != nil {
822 return nil, err
823 }
824 self = WrapWpImageDescriptionReferenceV1(r)
825 r.Data = self
826 return self, nil
827}
828func NewWpImageDescriptionReferenceV1Global(d *server.Display, version int32, bind server.BindFunc) error {
829 return d.CreateGlobal(WpImageDescriptionReferenceV1Interface, version, bind)
830}
831func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
832 if v == nil {
833 return nil
834 }
835 return v.GetResource()
836}
837func (self *WpColorManagerV1) GetResource() *server.Resource {
838 if self == nil {
839 return nil
840 }
841 return self.Resource
842}
843func (self *WpColorManagementOutputV1) GetResource() *server.Resource {
844 if self == nil {
845 return nil
846 }
847 return self.Resource
848}
849func (self *WpColorManagementSurfaceV1) GetResource() *server.Resource {
850 if self == nil {
851 return nil
852 }
853 return self.Resource
854}
855func (self *WpColorManagementSurfaceFeedbackV1) GetResource() *server.Resource {
856 if self == nil {
857 return nil
858 }
859 return self.Resource
860}
861func (self *WpImageDescriptionCreatorIccV1) GetResource() *server.Resource {
862 if self == nil {
863 return nil
864 }
865 return self.Resource
866}
867func (self *WpImageDescriptionCreatorParamsV1) GetResource() *server.Resource {
868 if self == nil {
869 return nil
870 }
871 return self.Resource
872}
873func (self *WpImageDescriptionV1) GetResource() *server.Resource {
874 if self == nil {
875 return nil
876 }
877 return self.Resource
878}
879func (self *WpImageDescriptionInfoV1) GetResource() *server.Resource {
880 if self == nil {
881 return nil
882 }
883 return self.Resource
884}
885func (self *WpImageDescriptionReferenceV1) GetResource() *server.Resource {
886 if self == nil {
887 return nil
888 }
889 return self.Resource
890}