1// Package gsk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gsk
3
4import (
5 "github.com/ebitengine/purego"
6
7 "github.com/bnema/puregotk/pkg/core"
8 "github.com/bnema/puregotk/v4/cairo"
9 "github.com/bnema/puregotk/v4/gdk"
10 "github.com/bnema/puregotk/v4/glib"
11 "github.com/bnema/puregotk/v4/gobject"
12 "github.com/bnema/puregotk/v4/gobject/types"
13 "github.com/bnema/puregotk/v4/graphene"
14 "github.com/bnema/puregotk/v4/pango"
15)
16
17// A render node applying a blending function between its two child nodes.
18type BlendNode struct {
19 RenderNode
20}
21
22var xBlendNodeGLibType func() types.GType
23
24func BlendNodeGLibType() types.GType {
25 return xBlendNodeGLibType()
26}
27
28func BlendNodeNewFromInternalPtr(ptr uintptr) *BlendNode {
29 cls := &BlendNode{}
30 cls.Ptr = ptr
31 return cls
32}
33
34var xNewBlendNode func(uintptr, uintptr, BlendMode) uintptr
35
36// Creates a `GskRenderNode` that will use @blend_mode to blend the @top
37// node onto the @bottom node.
38func NewBlendNode(BottomVar *RenderNode, TopVar *RenderNode, BlendModeVar BlendMode) *BlendNode {
39 var cls *BlendNode
40
41 cret := xNewBlendNode(BottomVar.GoPointer(), TopVar.GoPointer(), BlendModeVar)
42
43 if cret == 0 {
44 return nil
45 }
46 cls = &BlendNode{}
47 cls.Ptr = cret
48 return cls
49}
50
51var xBlendNodeGetBlendMode func(uintptr) BlendMode
52
53// Retrieves the blend mode used by @node.
54func (x *BlendNode) GetBlendMode() BlendMode {
55
56 cret := xBlendNodeGetBlendMode(x.GoPointer())
57 return cret
58}
59
60var xBlendNodeGetBottomChild func(uintptr) uintptr
61
62// Retrieves the bottom `GskRenderNode` child of the @node.
63func (x *BlendNode) GetBottomChild() *RenderNode {
64 var cls *RenderNode
65
66 cret := xBlendNodeGetBottomChild(x.GoPointer())
67
68 if cret == 0 {
69 return nil
70 }
71 gobject.IncreaseRef(cret)
72 cls = &RenderNode{}
73 cls.Ptr = cret
74 return cls
75}
76
77var xBlendNodeGetTopChild func(uintptr) uintptr
78
79// Retrieves the top `GskRenderNode` child of the @node.
80func (x *BlendNode) GetTopChild() *RenderNode {
81 var cls *RenderNode
82
83 cret := xBlendNodeGetTopChild(x.GoPointer())
84
85 if cret == 0 {
86 return nil
87 }
88 gobject.IncreaseRef(cret)
89 cls = &RenderNode{}
90 cls.Ptr = cret
91 return cls
92}
93
94func (c *BlendNode) GoPointer() uintptr {
95 if c == nil {
96 return 0
97 }
98 return c.Ptr
99}
100
101func (c *BlendNode) SetGoPointer(ptr uintptr) {
102 c.Ptr = ptr
103}
104
105// A render node applying a blur effect to its single child.
106type BlurNode struct {
107 RenderNode
108}
109
110var xBlurNodeGLibType func() types.GType
111
112func BlurNodeGLibType() types.GType {
113 return xBlurNodeGLibType()
114}
115
116func BlurNodeNewFromInternalPtr(ptr uintptr) *BlurNode {
117 cls := &BlurNode{}
118 cls.Ptr = ptr
119 return cls
120}
121
122var xNewBlurNode func(uintptr, float32) uintptr
123
124// Creates a render node that blurs the child.
125func NewBlurNode(ChildVar *RenderNode, RadiusVar float32) *BlurNode {
126 var cls *BlurNode
127
128 cret := xNewBlurNode(ChildVar.GoPointer(), RadiusVar)
129
130 if cret == 0 {
131 return nil
132 }
133 cls = &BlurNode{}
134 cls.Ptr = cret
135 return cls
136}
137
138var xBlurNodeGetChild func(uintptr) uintptr
139
140// Retrieves the child `GskRenderNode` of the blur @node.
141func (x *BlurNode) GetChild() *RenderNode {
142 var cls *RenderNode
143
144 cret := xBlurNodeGetChild(x.GoPointer())
145
146 if cret == 0 {
147 return nil
148 }
149 gobject.IncreaseRef(cret)
150 cls = &RenderNode{}
151 cls.Ptr = cret
152 return cls
153}
154
155var xBlurNodeGetRadius func(uintptr) float32
156
157// Retrieves the blur radius of the @node.
158func (x *BlurNode) GetRadius() float32 {
159
160 cret := xBlurNodeGetRadius(x.GoPointer())
161 return cret
162}
163
164func (c *BlurNode) GoPointer() uintptr {
165 if c == nil {
166 return 0
167 }
168 return c.Ptr
169}
170
171func (c *BlurNode) SetGoPointer(ptr uintptr) {
172 c.Ptr = ptr
173}
174
175// A render node for a border.
176type BorderNode struct {
177 RenderNode
178}
179
180var xBorderNodeGLibType func() types.GType
181
182func BorderNodeGLibType() types.GType {
183 return xBorderNodeGLibType()
184}
185
186func BorderNodeNewFromInternalPtr(ptr uintptr) *BorderNode {
187 cls := &BorderNode{}
188 cls.Ptr = ptr
189 return cls
190}
191
192var xNewBorderNode func(*RoundedRect, *[4]float32, *[4]gdk.RGBA) uintptr
193
194// Creates a `GskRenderNode` that will stroke a border rectangle inside the
195// given @outline.
196//
197// The 4 sides of the border can have different widths and colors.
198func NewBorderNode(OutlineVar *RoundedRect, BorderWidthVar [4]float32, BorderColorVar [4]gdk.RGBA) *BorderNode {
199 var cls *BorderNode
200
201 cret := xNewBorderNode(OutlineVar, &BorderWidthVar, &BorderColorVar)
202
203 if cret == 0 {
204 return nil
205 }
206 cls = &BorderNode{}
207 cls.Ptr = cret
208 return cls
209}
210
211var xBorderNodeGetColors func(uintptr) uintptr
212
213// Retrieves the colors of the border.
214func (x *BorderNode) GetColors() uintptr {
215
216 cret := xBorderNodeGetColors(x.GoPointer())
217 return cret
218}
219
220var xBorderNodeGetOutline func(uintptr) *RoundedRect
221
222// Retrieves the outline of the border.
223func (x *BorderNode) GetOutline() *RoundedRect {
224
225 cret := xBorderNodeGetOutline(x.GoPointer())
226 return cret
227}
228
229var xBorderNodeGetWidths func(uintptr) uintptr
230
231// Retrieves the stroke widths of the border.
232func (x *BorderNode) GetWidths() uintptr {
233
234 cret := xBorderNodeGetWidths(x.GoPointer())
235 return cret
236}
237
238func (c *BorderNode) GoPointer() uintptr {
239 if c == nil {
240 return 0
241 }
242 return c.Ptr
243}
244
245func (c *BorderNode) SetGoPointer(ptr uintptr) {
246 c.Ptr = ptr
247}
248
249// A render node for a Cairo surface.
250type CairoNode struct {
251 RenderNode
252}
253
254var xCairoNodeGLibType func() types.GType
255
256func CairoNodeGLibType() types.GType {
257 return xCairoNodeGLibType()
258}
259
260func CairoNodeNewFromInternalPtr(ptr uintptr) *CairoNode {
261 cls := &CairoNode{}
262 cls.Ptr = ptr
263 return cls
264}
265
266var xNewCairoNode func(*graphene.Rect) uintptr
267
268// Creates a `GskRenderNode` that will render a cairo surface
269// into the area given by @bounds.
270//
271// You can draw to the cairo surface using [method@Gsk.CairoNode.get_draw_context].
272func NewCairoNode(BoundsVar *graphene.Rect) *CairoNode {
273 var cls *CairoNode
274
275 cret := xNewCairoNode(BoundsVar)
276
277 if cret == 0 {
278 return nil
279 }
280 cls = &CairoNode{}
281 cls.Ptr = cret
282 return cls
283}
284
285var xCairoNodeGetDrawContext func(uintptr) *cairo.Context
286
287// Creates a Cairo context for drawing using the surface associated
288// to the render node.
289//
290// If no surface exists yet, a surface will be created optimized for
291// rendering to @renderer.
292func (x *CairoNode) GetDrawContext() *cairo.Context {
293
294 cret := xCairoNodeGetDrawContext(x.GoPointer())
295 return cret
296}
297
298var xCairoNodeGetSurface func(uintptr) *cairo.Surface
299
300// Retrieves the Cairo surface used by the render node.
301func (x *CairoNode) GetSurface() *cairo.Surface {
302
303 cret := xCairoNodeGetSurface(x.GoPointer())
304 return cret
305}
306
307func (c *CairoNode) GoPointer() uintptr {
308 if c == nil {
309 return 0
310 }
311 return c.Ptr
312}
313
314func (c *CairoNode) SetGoPointer(ptr uintptr) {
315 c.Ptr = ptr
316}
317
318// A render node applying a rectangular clip to its single child node.
319type ClipNode struct {
320 RenderNode
321}
322
323var xClipNodeGLibType func() types.GType
324
325func ClipNodeGLibType() types.GType {
326 return xClipNodeGLibType()
327}
328
329func ClipNodeNewFromInternalPtr(ptr uintptr) *ClipNode {
330 cls := &ClipNode{}
331 cls.Ptr = ptr
332 return cls
333}
334
335var xNewClipNode func(uintptr, *graphene.Rect) uintptr
336
337// Creates a `GskRenderNode` that will clip the @child to the area
338// given by @clip.
339func NewClipNode(ChildVar *RenderNode, ClipVar *graphene.Rect) *ClipNode {
340 var cls *ClipNode
341
342 cret := xNewClipNode(ChildVar.GoPointer(), ClipVar)
343
344 if cret == 0 {
345 return nil
346 }
347 cls = &ClipNode{}
348 cls.Ptr = cret
349 return cls
350}
351
352var xClipNodeGetChild func(uintptr) uintptr
353
354// Gets the child node that is getting clipped by the given @node.
355func (x *ClipNode) GetChild() *RenderNode {
356 var cls *RenderNode
357
358 cret := xClipNodeGetChild(x.GoPointer())
359
360 if cret == 0 {
361 return nil
362 }
363 gobject.IncreaseRef(cret)
364 cls = &RenderNode{}
365 cls.Ptr = cret
366 return cls
367}
368
369var xClipNodeGetClip func(uintptr) *graphene.Rect
370
371// Retrieves the clip rectangle for @node.
372func (x *ClipNode) GetClip() *graphene.Rect {
373
374 cret := xClipNodeGetClip(x.GoPointer())
375 return cret
376}
377
378func (c *ClipNode) GoPointer() uintptr {
379 if c == nil {
380 return 0
381 }
382 return c.Ptr
383}
384
385func (c *ClipNode) SetGoPointer(ptr uintptr) {
386 c.Ptr = ptr
387}
388
389// A render node controlling the color matrix of its single child node.
390type ColorMatrixNode struct {
391 RenderNode
392}
393
394var xColorMatrixNodeGLibType func() types.GType
395
396func ColorMatrixNodeGLibType() types.GType {
397 return xColorMatrixNodeGLibType()
398}
399
400func ColorMatrixNodeNewFromInternalPtr(ptr uintptr) *ColorMatrixNode {
401 cls := &ColorMatrixNode{}
402 cls.Ptr = ptr
403 return cls
404}
405
406var xNewColorMatrixNode func(uintptr, *graphene.Matrix, *graphene.Vec4) uintptr
407
408// Creates a `GskRenderNode` that will drawn the @child with
409// @color_matrix.
410//
411// In particular, the node will transform colors by applying
412//
413// pixel = transpose(color_matrix) * pixel + color_offset
414//
415// for every pixel. The transformation operates on unpremultiplied
416// colors, with color components ordered R, G, B, A.
417func NewColorMatrixNode(ChildVar *RenderNode, ColorMatrixVar *graphene.Matrix, ColorOffsetVar *graphene.Vec4) *ColorMatrixNode {
418 var cls *ColorMatrixNode
419
420 cret := xNewColorMatrixNode(ChildVar.GoPointer(), ColorMatrixVar, ColorOffsetVar)
421
422 if cret == 0 {
423 return nil
424 }
425 cls = &ColorMatrixNode{}
426 cls.Ptr = cret
427 return cls
428}
429
430var xColorMatrixNodeGetChild func(uintptr) uintptr
431
432// Gets the child node that is getting its colors modified by the given @node.
433func (x *ColorMatrixNode) GetChild() *RenderNode {
434 var cls *RenderNode
435
436 cret := xColorMatrixNodeGetChild(x.GoPointer())
437
438 if cret == 0 {
439 return nil
440 }
441 gobject.IncreaseRef(cret)
442 cls = &RenderNode{}
443 cls.Ptr = cret
444 return cls
445}
446
447var xColorMatrixNodeGetColorMatrix func(uintptr) *graphene.Matrix
448
449// Retrieves the color matrix used by the @node.
450func (x *ColorMatrixNode) GetColorMatrix() *graphene.Matrix {
451
452 cret := xColorMatrixNodeGetColorMatrix(x.GoPointer())
453 return cret
454}
455
456var xColorMatrixNodeGetColorOffset func(uintptr) *graphene.Vec4
457
458// Retrieves the color offset used by the @node.
459func (x *ColorMatrixNode) GetColorOffset() *graphene.Vec4 {
460
461 cret := xColorMatrixNodeGetColorOffset(x.GoPointer())
462 return cret
463}
464
465func (c *ColorMatrixNode) GoPointer() uintptr {
466 if c == nil {
467 return 0
468 }
469 return c.Ptr
470}
471
472func (c *ColorMatrixNode) SetGoPointer(ptr uintptr) {
473 c.Ptr = ptr
474}
475
476// A render node for a solid color.
477type ColorNode struct {
478 RenderNode
479}
480
481var xColorNodeGLibType func() types.GType
482
483func ColorNodeGLibType() types.GType {
484 return xColorNodeGLibType()
485}
486
487func ColorNodeNewFromInternalPtr(ptr uintptr) *ColorNode {
488 cls := &ColorNode{}
489 cls.Ptr = ptr
490 return cls
491}
492
493var xNewColorNode func(*gdk.RGBA, *graphene.Rect) uintptr
494
495// Creates a `GskRenderNode` that will render the color specified by @rgba into
496// the area given by @bounds.
497func NewColorNode(RgbaVar *gdk.RGBA, BoundsVar *graphene.Rect) *ColorNode {
498 var cls *ColorNode
499
500 cret := xNewColorNode(RgbaVar, BoundsVar)
501
502 if cret == 0 {
503 return nil
504 }
505 cls = &ColorNode{}
506 cls.Ptr = cret
507 return cls
508}
509
510var xColorNodeGetColor func(uintptr) *gdk.RGBA
511
512// Retrieves the color of the given @node.
513//
514// The value returned by this function will not be correct
515// if the render node was created for a non-sRGB color.
516func (x *ColorNode) GetColor() *gdk.RGBA {
517
518 cret := xColorNodeGetColor(x.GoPointer())
519 return cret
520}
521
522func (c *ColorNode) GoPointer() uintptr {
523 if c == nil {
524 return 0
525 }
526 return c.Ptr
527}
528
529func (c *ColorNode) SetGoPointer(ptr uintptr) {
530 c.Ptr = ptr
531}
532
533// A render node for a conic gradient.
534type ConicGradientNode struct {
535 RenderNode
536}
537
538var xConicGradientNodeGLibType func() types.GType
539
540func ConicGradientNodeGLibType() types.GType {
541 return xConicGradientNodeGLibType()
542}
543
544func ConicGradientNodeNewFromInternalPtr(ptr uintptr) *ConicGradientNode {
545 cls := &ConicGradientNode{}
546 cls.Ptr = ptr
547 return cls
548}
549
550var xNewConicGradientNode func(*graphene.Rect, *graphene.Point, float32, []ColorStop, uint) uintptr
551
552// Creates a `GskRenderNode` that draws a conic gradient.
553//
554// The conic gradient
555// starts around @center in the direction of @rotation. A rotation of 0 means
556// that the gradient points up. Color stops are then added clockwise.
557func NewConicGradientNode(BoundsVar *graphene.Rect, CenterVar *graphene.Point, RotationVar float32, ColorStopsVar []ColorStop, NColorStopsVar uint) *ConicGradientNode {
558 var cls *ConicGradientNode
559
560 cret := xNewConicGradientNode(BoundsVar, CenterVar, RotationVar, ColorStopsVar, NColorStopsVar)
561
562 if cret == 0 {
563 return nil
564 }
565 cls = &ConicGradientNode{}
566 cls.Ptr = cret
567 return cls
568}
569
570var xConicGradientNodeGetAngle func(uintptr) float32
571
572// Retrieves the angle for the gradient in radians, normalized in [0, 2 * PI].
573//
574// The angle is starting at the top and going clockwise, as expressed
575// in the css specification:
576//
577// angle = 90 - gsk_conic_gradient_node_get_rotation()
578func (x *ConicGradientNode) GetAngle() float32 {
579
580 cret := xConicGradientNodeGetAngle(x.GoPointer())
581 return cret
582}
583
584var xConicGradientNodeGetCenter func(uintptr) *graphene.Point
585
586// Retrieves the center pointer for the gradient.
587func (x *ConicGradientNode) GetCenter() *graphene.Point {
588
589 cret := xConicGradientNodeGetCenter(x.GoPointer())
590 return cret
591}
592
593var xConicGradientNodeGetColorStops func(uintptr, *uint) uintptr
594
595// Retrieves the color stops in the gradient.
596func (x *ConicGradientNode) GetColorStops(NStopsVar *uint) uintptr {
597
598 cret := xConicGradientNodeGetColorStops(x.GoPointer(), NStopsVar)
599 return cret
600}
601
602var xConicGradientNodeGetNColorStops func(uintptr) uint
603
604// Retrieves the number of color stops in the gradient.
605func (x *ConicGradientNode) GetNColorStops() uint {
606
607 cret := xConicGradientNodeGetNColorStops(x.GoPointer())
608 return cret
609}
610
611var xConicGradientNodeGetRotation func(uintptr) float32
612
613// Retrieves the rotation for the gradient in degrees.
614func (x *ConicGradientNode) GetRotation() float32 {
615
616 cret := xConicGradientNodeGetRotation(x.GoPointer())
617 return cret
618}
619
620func (c *ConicGradientNode) GoPointer() uintptr {
621 if c == nil {
622 return 0
623 }
624 return c.Ptr
625}
626
627func (c *ConicGradientNode) SetGoPointer(ptr uintptr) {
628 c.Ptr = ptr
629}
630
631// A render node that can contain other render nodes.
632type ContainerNode struct {
633 RenderNode
634}
635
636var xContainerNodeGLibType func() types.GType
637
638func ContainerNodeGLibType() types.GType {
639 return xContainerNodeGLibType()
640}
641
642func ContainerNodeNewFromInternalPtr(ptr uintptr) *ContainerNode {
643 cls := &ContainerNode{}
644 cls.Ptr = ptr
645 return cls
646}
647
648var xNewContainerNode func(uintptr, uint) uintptr
649
650// Creates a new `GskRenderNode` instance for holding the given @children.
651//
652// The new node will acquire a reference to each of the children.
653func NewContainerNode(ChildrenVar uintptr, NChildrenVar uint) *ContainerNode {
654 var cls *ContainerNode
655
656 cret := xNewContainerNode(ChildrenVar, NChildrenVar)
657
658 if cret == 0 {
659 return nil
660 }
661 cls = &ContainerNode{}
662 cls.Ptr = cret
663 return cls
664}
665
666var xContainerNodeGetChild func(uintptr, uint) uintptr
667
668// Gets one of the children of @container.
669func (x *ContainerNode) GetChild(IdxVar uint) *RenderNode {
670 var cls *RenderNode
671
672 cret := xContainerNodeGetChild(x.GoPointer(), IdxVar)
673
674 if cret == 0 {
675 return nil
676 }
677 gobject.IncreaseRef(cret)
678 cls = &RenderNode{}
679 cls.Ptr = cret
680 return cls
681}
682
683var xContainerNodeGetNChildren func(uintptr) uint
684
685// Retrieves the number of direct children of @node.
686func (x *ContainerNode) GetNChildren() uint {
687
688 cret := xContainerNodeGetNChildren(x.GoPointer())
689 return cret
690}
691
692func (c *ContainerNode) GoPointer() uintptr {
693 if c == nil {
694 return 0
695 }
696 return c.Ptr
697}
698
699func (c *ContainerNode) SetGoPointer(ptr uintptr) {
700 c.Ptr = ptr
701}
702
703// A render node cross fading between two child nodes.
704type CrossFadeNode struct {
705 RenderNode
706}
707
708var xCrossFadeNodeGLibType func() types.GType
709
710func CrossFadeNodeGLibType() types.GType {
711 return xCrossFadeNodeGLibType()
712}
713
714func CrossFadeNodeNewFromInternalPtr(ptr uintptr) *CrossFadeNode {
715 cls := &CrossFadeNode{}
716 cls.Ptr = ptr
717 return cls
718}
719
720var xNewCrossFadeNode func(uintptr, uintptr, float32) uintptr
721
722// Creates a `GskRenderNode` that will do a cross-fade between @start and @end.
723func NewCrossFadeNode(StartVar *RenderNode, EndVar *RenderNode, ProgressVar float32) *CrossFadeNode {
724 var cls *CrossFadeNode
725
726 cret := xNewCrossFadeNode(StartVar.GoPointer(), EndVar.GoPointer(), ProgressVar)
727
728 if cret == 0 {
729 return nil
730 }
731 cls = &CrossFadeNode{}
732 cls.Ptr = cret
733 return cls
734}
735
736var xCrossFadeNodeGetEndChild func(uintptr) uintptr
737
738// Retrieves the child `GskRenderNode` at the end of the cross-fade.
739func (x *CrossFadeNode) GetEndChild() *RenderNode {
740 var cls *RenderNode
741
742 cret := xCrossFadeNodeGetEndChild(x.GoPointer())
743
744 if cret == 0 {
745 return nil
746 }
747 gobject.IncreaseRef(cret)
748 cls = &RenderNode{}
749 cls.Ptr = cret
750 return cls
751}
752
753var xCrossFadeNodeGetProgress func(uintptr) float32
754
755// Retrieves the progress value of the cross fade.
756func (x *CrossFadeNode) GetProgress() float32 {
757
758 cret := xCrossFadeNodeGetProgress(x.GoPointer())
759 return cret
760}
761
762var xCrossFadeNodeGetStartChild func(uintptr) uintptr
763
764// Retrieves the child `GskRenderNode` at the beginning of the cross-fade.
765func (x *CrossFadeNode) GetStartChild() *RenderNode {
766 var cls *RenderNode
767
768 cret := xCrossFadeNodeGetStartChild(x.GoPointer())
769
770 if cret == 0 {
771 return nil
772 }
773 gobject.IncreaseRef(cret)
774 cls = &RenderNode{}
775 cls.Ptr = cret
776 return cls
777}
778
779func (c *CrossFadeNode) GoPointer() uintptr {
780 if c == nil {
781 return 0
782 }
783 return c.Ptr
784}
785
786func (c *CrossFadeNode) SetGoPointer(ptr uintptr) {
787 c.Ptr = ptr
788}
789
790// A render node that emits a debugging message when drawing its
791// child node.
792type DebugNode struct {
793 RenderNode
794}
795
796var xDebugNodeGLibType func() types.GType
797
798func DebugNodeGLibType() types.GType {
799 return xDebugNodeGLibType()
800}
801
802func DebugNodeNewFromInternalPtr(ptr uintptr) *DebugNode {
803 cls := &DebugNode{}
804 cls.Ptr = ptr
805 return cls
806}
807
808var xNewDebugNode func(uintptr, uintptr) uintptr
809
810// Creates a `GskRenderNode` that will add debug information about
811// the given @child.
812//
813// Adding this node has no visual effect.
814func NewDebugNode(ChildVar *RenderNode, MessageVar string) *DebugNode {
815 var cls *DebugNode
816
817 cret := xNewDebugNode(ChildVar.GoPointer(), core.GStrdup(MessageVar))
818
819 if cret == 0 {
820 return nil
821 }
822 cls = &DebugNode{}
823 cls.Ptr = cret
824 return cls
825}
826
827var xDebugNodeGetChild func(uintptr) uintptr
828
829// Gets the child node that is getting drawn by the given @node.
830func (x *DebugNode) GetChild() *RenderNode {
831 var cls *RenderNode
832
833 cret := xDebugNodeGetChild(x.GoPointer())
834
835 if cret == 0 {
836 return nil
837 }
838 gobject.IncreaseRef(cret)
839 cls = &RenderNode{}
840 cls.Ptr = cret
841 return cls
842}
843
844var xDebugNodeGetMessage func(uintptr) string
845
846// Gets the debug message that was set on this node
847func (x *DebugNode) GetMessage() string {
848
849 cret := xDebugNodeGetMessage(x.GoPointer())
850 return cret
851}
852
853func (c *DebugNode) GoPointer() uintptr {
854 if c == nil {
855 return 0
856 }
857 return c.Ptr
858}
859
860func (c *DebugNode) SetGoPointer(ptr uintptr) {
861 c.Ptr = ptr
862}
863
864// A render node filling the area given by [struct@Gsk.Path]
865// and [enum@Gsk.FillRule] with the child node.
866type FillNode struct {
867 RenderNode
868}
869
870var xFillNodeGLibType func() types.GType
871
872func FillNodeGLibType() types.GType {
873 return xFillNodeGLibType()
874}
875
876func FillNodeNewFromInternalPtr(ptr uintptr) *FillNode {
877 cls := &FillNode{}
878 cls.Ptr = ptr
879 return cls
880}
881
882var xNewFillNode func(uintptr, *Path, FillRule) uintptr
883
884// Creates a `GskRenderNode` that will fill the @child in the area
885// given by @path and @fill_rule.
886func NewFillNode(ChildVar *RenderNode, PathVar *Path, FillRuleVar FillRule) *FillNode {
887 var cls *FillNode
888
889 cret := xNewFillNode(ChildVar.GoPointer(), PathVar, FillRuleVar)
890
891 if cret == 0 {
892 return nil
893 }
894 gobject.IncreaseRef(cret)
895 cls = &FillNode{}
896 cls.Ptr = cret
897 return cls
898}
899
900var xFillNodeGetChild func(uintptr) uintptr
901
902// Gets the child node that is getting drawn by the given @node.
903func (x *FillNode) GetChild() *RenderNode {
904 var cls *RenderNode
905
906 cret := xFillNodeGetChild(x.GoPointer())
907
908 if cret == 0 {
909 return nil
910 }
911 gobject.IncreaseRef(cret)
912 cls = &RenderNode{}
913 cls.Ptr = cret
914 return cls
915}
916
917var xFillNodeGetFillRule func(uintptr) FillRule
918
919// Retrieves the fill rule used to determine how the path is filled.
920func (x *FillNode) GetFillRule() FillRule {
921
922 cret := xFillNodeGetFillRule(x.GoPointer())
923 return cret
924}
925
926var xFillNodeGetPath func(uintptr) *Path
927
928// Retrieves the path used to describe the area filled with the contents of
929// the @node.
930func (x *FillNode) GetPath() *Path {
931
932 cret := xFillNodeGetPath(x.GoPointer())
933 return cret
934}
935
936func (c *FillNode) GoPointer() uintptr {
937 if c == nil {
938 return 0
939 }
940 return c.Ptr
941}
942
943func (c *FillNode) SetGoPointer(ptr uintptr) {
944 c.Ptr = ptr
945}
946
947// A render node using a GL shader when drawing its children nodes.
948type GLShaderNode struct {
949 RenderNode
950}
951
952var xGLShaderNodeGLibType func() types.GType
953
954func GLShaderNodeGLibType() types.GType {
955 return xGLShaderNodeGLibType()
956}
957
958func GLShaderNodeNewFromInternalPtr(ptr uintptr) *GLShaderNode {
959 cls := &GLShaderNode{}
960 cls.Ptr = ptr
961 return cls
962}
963
964var xNewGLShaderNode func(uintptr, *graphene.Rect, *glib.Bytes, uintptr, uint) uintptr
965
966// Creates a `GskRenderNode` that will render the given @shader into the
967// area given by @bounds.
968//
969// The @args is a block of data to use for uniform input, as per types and
970// offsets defined by the @shader. Normally this is generated by
971// [method@Gsk.GLShader.format_args] or [struct@Gsk.ShaderArgsBuilder].
972//
973// See [class@Gsk.GLShader] for details about how the shader should be written.
974//
975// All the children will be rendered into textures (if they aren't already
976// `GskTextureNodes`, which will be used directly). These textures will be
977// sent as input to the shader.
978//
979// If the renderer doesn't support GL shaders, or if there is any problem
980// when compiling the shader, then the node will draw pink. You should use
981// [method@Gsk.GLShader.compile] to ensure the @shader will work for the
982// renderer before using it.
983func NewGLShaderNode(ShaderVar *GLShader, BoundsVar *graphene.Rect, ArgsVar *glib.Bytes, ChildrenVar uintptr, NChildrenVar uint) *GLShaderNode {
984 var cls *GLShaderNode
985
986 cret := xNewGLShaderNode(ShaderVar.GoPointer(), BoundsVar, ArgsVar, ChildrenVar, NChildrenVar)
987
988 if cret == 0 {
989 return nil
990 }
991 cls = &GLShaderNode{}
992 cls.Ptr = cret
993 return cls
994}
995
996var xGLShaderNodeGetArgs func(uintptr) *glib.Bytes
997
998// Gets args for the node.
999func (x *GLShaderNode) GetArgs() *glib.Bytes {
1000
1001 cret := xGLShaderNodeGetArgs(x.GoPointer())
1002 return cret
1003}
1004
1005var xGLShaderNodeGetChild func(uintptr, uint) uintptr
1006
1007// Gets one of the children.
1008func (x *GLShaderNode) GetChild(IdxVar uint) *RenderNode {
1009 var cls *RenderNode
1010
1011 cret := xGLShaderNodeGetChild(x.GoPointer(), IdxVar)
1012
1013 if cret == 0 {
1014 return nil
1015 }
1016 gobject.IncreaseRef(cret)
1017 cls = &RenderNode{}
1018 cls.Ptr = cret
1019 return cls
1020}
1021
1022var xGLShaderNodeGetNChildren func(uintptr) uint
1023
1024// Returns the number of children
1025func (x *GLShaderNode) GetNChildren() uint {
1026
1027 cret := xGLShaderNodeGetNChildren(x.GoPointer())
1028 return cret
1029}
1030
1031var xGLShaderNodeGetShader func(uintptr) uintptr
1032
1033// Gets shader code for the node.
1034func (x *GLShaderNode) GetShader() *GLShader {
1035 var cls *GLShader
1036
1037 cret := xGLShaderNodeGetShader(x.GoPointer())
1038
1039 if cret == 0 {
1040 return nil
1041 }
1042 gobject.IncreaseRef(cret)
1043 cls = &GLShader{}
1044 cls.Ptr = cret
1045 return cls
1046}
1047
1048func (c *GLShaderNode) GoPointer() uintptr {
1049 if c == nil {
1050 return 0
1051 }
1052 return c.Ptr
1053}
1054
1055func (c *GLShaderNode) SetGoPointer(ptr uintptr) {
1056 c.Ptr = ptr
1057}
1058
1059// A render node for an inset shadow.
1060type InsetShadowNode struct {
1061 RenderNode
1062}
1063
1064var xInsetShadowNodeGLibType func() types.GType
1065
1066func InsetShadowNodeGLibType() types.GType {
1067 return xInsetShadowNodeGLibType()
1068}
1069
1070func InsetShadowNodeNewFromInternalPtr(ptr uintptr) *InsetShadowNode {
1071 cls := &InsetShadowNode{}
1072 cls.Ptr = ptr
1073 return cls
1074}
1075
1076var xNewInsetShadowNode func(*RoundedRect, *gdk.RGBA, float32, float32, float32, float32) uintptr
1077
1078// Creates a `GskRenderNode` that will render an inset shadow
1079// into the box given by @outline.
1080func NewInsetShadowNode(OutlineVar *RoundedRect, ColorVar *gdk.RGBA, DxVar float32, DyVar float32, SpreadVar float32, BlurRadiusVar float32) *InsetShadowNode {
1081 var cls *InsetShadowNode
1082
1083 cret := xNewInsetShadowNode(OutlineVar, ColorVar, DxVar, DyVar, SpreadVar, BlurRadiusVar)
1084
1085 if cret == 0 {
1086 return nil
1087 }
1088 cls = &InsetShadowNode{}
1089 cls.Ptr = cret
1090 return cls
1091}
1092
1093var xInsetShadowNodeGetBlurRadius func(uintptr) float32
1094
1095// Retrieves the blur radius to apply to the shadow.
1096func (x *InsetShadowNode) GetBlurRadius() float32 {
1097
1098 cret := xInsetShadowNodeGetBlurRadius(x.GoPointer())
1099 return cret
1100}
1101
1102var xInsetShadowNodeGetColor func(uintptr) *gdk.RGBA
1103
1104// Retrieves the color of the inset shadow.
1105//
1106// The value returned by this function will not be correct
1107// if the render node was created for a non-sRGB color.
1108func (x *InsetShadowNode) GetColor() *gdk.RGBA {
1109
1110 cret := xInsetShadowNodeGetColor(x.GoPointer())
1111 return cret
1112}
1113
1114var xInsetShadowNodeGetDx func(uintptr) float32
1115
1116// Retrieves the horizontal offset of the inset shadow.
1117func (x *InsetShadowNode) GetDx() float32 {
1118
1119 cret := xInsetShadowNodeGetDx(x.GoPointer())
1120 return cret
1121}
1122
1123var xInsetShadowNodeGetDy func(uintptr) float32
1124
1125// Retrieves the vertical offset of the inset shadow.
1126func (x *InsetShadowNode) GetDy() float32 {
1127
1128 cret := xInsetShadowNodeGetDy(x.GoPointer())
1129 return cret
1130}
1131
1132var xInsetShadowNodeGetOutline func(uintptr) *RoundedRect
1133
1134// Retrieves the outline rectangle of the inset shadow.
1135func (x *InsetShadowNode) GetOutline() *RoundedRect {
1136
1137 cret := xInsetShadowNodeGetOutline(x.GoPointer())
1138 return cret
1139}
1140
1141var xInsetShadowNodeGetSpread func(uintptr) float32
1142
1143// Retrieves how much the shadow spreads inwards.
1144func (x *InsetShadowNode) GetSpread() float32 {
1145
1146 cret := xInsetShadowNodeGetSpread(x.GoPointer())
1147 return cret
1148}
1149
1150func (c *InsetShadowNode) GoPointer() uintptr {
1151 if c == nil {
1152 return 0
1153 }
1154 return c.Ptr
1155}
1156
1157func (c *InsetShadowNode) SetGoPointer(ptr uintptr) {
1158 c.Ptr = ptr
1159}
1160
1161// A render node for a linear gradient.
1162type LinearGradientNode struct {
1163 RenderNode
1164}
1165
1166var xLinearGradientNodeGLibType func() types.GType
1167
1168func LinearGradientNodeGLibType() types.GType {
1169 return xLinearGradientNodeGLibType()
1170}
1171
1172func LinearGradientNodeNewFromInternalPtr(ptr uintptr) *LinearGradientNode {
1173 cls := &LinearGradientNode{}
1174 cls.Ptr = ptr
1175 return cls
1176}
1177
1178var xNewLinearGradientNode func(*graphene.Rect, *graphene.Point, *graphene.Point, []ColorStop, uint) uintptr
1179
1180// Creates a `GskRenderNode` that will create a linear gradient from the given
1181// points and color stops, and render that into the area given by @bounds.
1182func NewLinearGradientNode(BoundsVar *graphene.Rect, StartVar *graphene.Point, EndVar *graphene.Point, ColorStopsVar []ColorStop, NColorStopsVar uint) *LinearGradientNode {
1183 var cls *LinearGradientNode
1184
1185 cret := xNewLinearGradientNode(BoundsVar, StartVar, EndVar, ColorStopsVar, NColorStopsVar)
1186
1187 if cret == 0 {
1188 return nil
1189 }
1190 cls = &LinearGradientNode{}
1191 cls.Ptr = cret
1192 return cls
1193}
1194
1195var xLinearGradientNodeGetColorStops func(uintptr, *uint) uintptr
1196
1197// Retrieves the color stops in the gradient.
1198func (x *LinearGradientNode) GetColorStops(NStopsVar *uint) uintptr {
1199
1200 cret := xLinearGradientNodeGetColorStops(x.GoPointer(), NStopsVar)
1201 return cret
1202}
1203
1204var xLinearGradientNodeGetEnd func(uintptr) *graphene.Point
1205
1206// Retrieves the final point of the linear gradient.
1207func (x *LinearGradientNode) GetEnd() *graphene.Point {
1208
1209 cret := xLinearGradientNodeGetEnd(x.GoPointer())
1210 return cret
1211}
1212
1213var xLinearGradientNodeGetNColorStops func(uintptr) uint
1214
1215// Retrieves the number of color stops in the gradient.
1216func (x *LinearGradientNode) GetNColorStops() uint {
1217
1218 cret := xLinearGradientNodeGetNColorStops(x.GoPointer())
1219 return cret
1220}
1221
1222var xLinearGradientNodeGetStart func(uintptr) *graphene.Point
1223
1224// Retrieves the initial point of the linear gradient.
1225func (x *LinearGradientNode) GetStart() *graphene.Point {
1226
1227 cret := xLinearGradientNodeGetStart(x.GoPointer())
1228 return cret
1229}
1230
1231func (c *LinearGradientNode) GoPointer() uintptr {
1232 if c == nil {
1233 return 0
1234 }
1235 return c.Ptr
1236}
1237
1238func (c *LinearGradientNode) SetGoPointer(ptr uintptr) {
1239 c.Ptr = ptr
1240}
1241
1242// A render node masking one child node with another.
1243type MaskNode struct {
1244 RenderNode
1245}
1246
1247var xMaskNodeGLibType func() types.GType
1248
1249func MaskNodeGLibType() types.GType {
1250 return xMaskNodeGLibType()
1251}
1252
1253func MaskNodeNewFromInternalPtr(ptr uintptr) *MaskNode {
1254 cls := &MaskNode{}
1255 cls.Ptr = ptr
1256 return cls
1257}
1258
1259var xNewMaskNode func(uintptr, uintptr, MaskMode) uintptr
1260
1261// Creates a `GskRenderNode` that will mask a given node by another.
1262//
1263// The @mask_mode determines how the 'mask values' are derived from
1264// the colors of the @mask. Applying the mask consists of multiplying
1265// the 'mask value' with the alpha of the source.
1266func NewMaskNode(SourceVar *RenderNode, MaskVar *RenderNode, MaskModeVar MaskMode) *MaskNode {
1267 var cls *MaskNode
1268
1269 cret := xNewMaskNode(SourceVar.GoPointer(), MaskVar.GoPointer(), MaskModeVar)
1270
1271 if cret == 0 {
1272 return nil
1273 }
1274 cls = &MaskNode{}
1275 cls.Ptr = cret
1276 return cls
1277}
1278
1279var xMaskNodeGetMask func(uintptr) uintptr
1280
1281// Retrieves the mask `GskRenderNode` child of the @node.
1282func (x *MaskNode) GetMask() *RenderNode {
1283 var cls *RenderNode
1284
1285 cret := xMaskNodeGetMask(x.GoPointer())
1286
1287 if cret == 0 {
1288 return nil
1289 }
1290 gobject.IncreaseRef(cret)
1291 cls = &RenderNode{}
1292 cls.Ptr = cret
1293 return cls
1294}
1295
1296var xMaskNodeGetMaskMode func(uintptr) MaskMode
1297
1298// Retrieves the mask mode used by @node.
1299func (x *MaskNode) GetMaskMode() MaskMode {
1300
1301 cret := xMaskNodeGetMaskMode(x.GoPointer())
1302 return cret
1303}
1304
1305var xMaskNodeGetSource func(uintptr) uintptr
1306
1307// Retrieves the source `GskRenderNode` child of the @node.
1308func (x *MaskNode) GetSource() *RenderNode {
1309 var cls *RenderNode
1310
1311 cret := xMaskNodeGetSource(x.GoPointer())
1312
1313 if cret == 0 {
1314 return nil
1315 }
1316 gobject.IncreaseRef(cret)
1317 cls = &RenderNode{}
1318 cls.Ptr = cret
1319 return cls
1320}
1321
1322func (c *MaskNode) GoPointer() uintptr {
1323 if c == nil {
1324 return 0
1325 }
1326 return c.Ptr
1327}
1328
1329func (c *MaskNode) SetGoPointer(ptr uintptr) {
1330 c.Ptr = ptr
1331}
1332
1333// A render node controlling the opacity of its single child node.
1334type OpacityNode struct {
1335 RenderNode
1336}
1337
1338var xOpacityNodeGLibType func() types.GType
1339
1340func OpacityNodeGLibType() types.GType {
1341 return xOpacityNodeGLibType()
1342}
1343
1344func OpacityNodeNewFromInternalPtr(ptr uintptr) *OpacityNode {
1345 cls := &OpacityNode{}
1346 cls.Ptr = ptr
1347 return cls
1348}
1349
1350var xNewOpacityNode func(uintptr, float32) uintptr
1351
1352// Creates a `GskRenderNode` that will drawn the @child with reduced
1353// @opacity.
1354func NewOpacityNode(ChildVar *RenderNode, OpacityVar float32) *OpacityNode {
1355 var cls *OpacityNode
1356
1357 cret := xNewOpacityNode(ChildVar.GoPointer(), OpacityVar)
1358
1359 if cret == 0 {
1360 return nil
1361 }
1362 cls = &OpacityNode{}
1363 cls.Ptr = cret
1364 return cls
1365}
1366
1367var xOpacityNodeGetChild func(uintptr) uintptr
1368
1369// Gets the child node that is getting opacityed by the given @node.
1370func (x *OpacityNode) GetChild() *RenderNode {
1371 var cls *RenderNode
1372
1373 cret := xOpacityNodeGetChild(x.GoPointer())
1374
1375 if cret == 0 {
1376 return nil
1377 }
1378 gobject.IncreaseRef(cret)
1379 cls = &RenderNode{}
1380 cls.Ptr = cret
1381 return cls
1382}
1383
1384var xOpacityNodeGetOpacity func(uintptr) float32
1385
1386// Gets the transparency factor for an opacity node.
1387func (x *OpacityNode) GetOpacity() float32 {
1388
1389 cret := xOpacityNodeGetOpacity(x.GoPointer())
1390 return cret
1391}
1392
1393func (c *OpacityNode) GoPointer() uintptr {
1394 if c == nil {
1395 return 0
1396 }
1397 return c.Ptr
1398}
1399
1400func (c *OpacityNode) SetGoPointer(ptr uintptr) {
1401 c.Ptr = ptr
1402}
1403
1404// A render node for an outset shadow.
1405type OutsetShadowNode struct {
1406 RenderNode
1407}
1408
1409var xOutsetShadowNodeGLibType func() types.GType
1410
1411func OutsetShadowNodeGLibType() types.GType {
1412 return xOutsetShadowNodeGLibType()
1413}
1414
1415func OutsetShadowNodeNewFromInternalPtr(ptr uintptr) *OutsetShadowNode {
1416 cls := &OutsetShadowNode{}
1417 cls.Ptr = ptr
1418 return cls
1419}
1420
1421var xNewOutsetShadowNode func(*RoundedRect, *gdk.RGBA, float32, float32, float32, float32) uintptr
1422
1423// Creates a `GskRenderNode` that will render an outset shadow
1424// around the box given by @outline.
1425func NewOutsetShadowNode(OutlineVar *RoundedRect, ColorVar *gdk.RGBA, DxVar float32, DyVar float32, SpreadVar float32, BlurRadiusVar float32) *OutsetShadowNode {
1426 var cls *OutsetShadowNode
1427
1428 cret := xNewOutsetShadowNode(OutlineVar, ColorVar, DxVar, DyVar, SpreadVar, BlurRadiusVar)
1429
1430 if cret == 0 {
1431 return nil
1432 }
1433 cls = &OutsetShadowNode{}
1434 cls.Ptr = cret
1435 return cls
1436}
1437
1438var xOutsetShadowNodeGetBlurRadius func(uintptr) float32
1439
1440// Retrieves the blur radius of the shadow.
1441func (x *OutsetShadowNode) GetBlurRadius() float32 {
1442
1443 cret := xOutsetShadowNodeGetBlurRadius(x.GoPointer())
1444 return cret
1445}
1446
1447var xOutsetShadowNodeGetColor func(uintptr) *gdk.RGBA
1448
1449// Retrieves the color of the outset shadow.
1450//
1451// The value returned by this function will not be correct
1452// if the render node was created for a non-sRGB color.
1453func (x *OutsetShadowNode) GetColor() *gdk.RGBA {
1454
1455 cret := xOutsetShadowNodeGetColor(x.GoPointer())
1456 return cret
1457}
1458
1459var xOutsetShadowNodeGetDx func(uintptr) float32
1460
1461// Retrieves the horizontal offset of the outset shadow.
1462func (x *OutsetShadowNode) GetDx() float32 {
1463
1464 cret := xOutsetShadowNodeGetDx(x.GoPointer())
1465 return cret
1466}
1467
1468var xOutsetShadowNodeGetDy func(uintptr) float32
1469
1470// Retrieves the vertical offset of the outset shadow.
1471func (x *OutsetShadowNode) GetDy() float32 {
1472
1473 cret := xOutsetShadowNodeGetDy(x.GoPointer())
1474 return cret
1475}
1476
1477var xOutsetShadowNodeGetOutline func(uintptr) *RoundedRect
1478
1479// Retrieves the outline rectangle of the outset shadow.
1480func (x *OutsetShadowNode) GetOutline() *RoundedRect {
1481
1482 cret := xOutsetShadowNodeGetOutline(x.GoPointer())
1483 return cret
1484}
1485
1486var xOutsetShadowNodeGetSpread func(uintptr) float32
1487
1488// Retrieves how much the shadow spreads outwards.
1489func (x *OutsetShadowNode) GetSpread() float32 {
1490
1491 cret := xOutsetShadowNodeGetSpread(x.GoPointer())
1492 return cret
1493}
1494
1495func (c *OutsetShadowNode) GoPointer() uintptr {
1496 if c == nil {
1497 return 0
1498 }
1499 return c.Ptr
1500}
1501
1502func (c *OutsetShadowNode) SetGoPointer(ptr uintptr) {
1503 c.Ptr = ptr
1504}
1505
1506// A render node for a radial gradient.
1507type RadialGradientNode struct {
1508 RenderNode
1509}
1510
1511var xRadialGradientNodeGLibType func() types.GType
1512
1513func RadialGradientNodeGLibType() types.GType {
1514 return xRadialGradientNodeGLibType()
1515}
1516
1517func RadialGradientNodeNewFromInternalPtr(ptr uintptr) *RadialGradientNode {
1518 cls := &RadialGradientNode{}
1519 cls.Ptr = ptr
1520 return cls
1521}
1522
1523var xNewRadialGradientNode func(*graphene.Rect, *graphene.Point, float32, float32, float32, float32, []ColorStop, uint) uintptr
1524
1525// Creates a `GskRenderNode` that draws a radial gradient.
1526//
1527// The radial gradient
1528// starts around @center. The size of the gradient is dictated by @hradius
1529// in horizontal orientation and by @vradius in vertical orientation.
1530func NewRadialGradientNode(BoundsVar *graphene.Rect, CenterVar *graphene.Point, HradiusVar float32, VradiusVar float32, StartVar float32, EndVar float32, ColorStopsVar []ColorStop, NColorStopsVar uint) *RadialGradientNode {
1531 var cls *RadialGradientNode
1532
1533 cret := xNewRadialGradientNode(BoundsVar, CenterVar, HradiusVar, VradiusVar, StartVar, EndVar, ColorStopsVar, NColorStopsVar)
1534
1535 if cret == 0 {
1536 return nil
1537 }
1538 cls = &RadialGradientNode{}
1539 cls.Ptr = cret
1540 return cls
1541}
1542
1543var xRadialGradientNodeGetCenter func(uintptr) *graphene.Point
1544
1545// Retrieves the center pointer for the gradient.
1546func (x *RadialGradientNode) GetCenter() *graphene.Point {
1547
1548 cret := xRadialGradientNodeGetCenter(x.GoPointer())
1549 return cret
1550}
1551
1552var xRadialGradientNodeGetColorStops func(uintptr, *uint) uintptr
1553
1554// Retrieves the color stops in the gradient.
1555func (x *RadialGradientNode) GetColorStops(NStopsVar *uint) uintptr {
1556
1557 cret := xRadialGradientNodeGetColorStops(x.GoPointer(), NStopsVar)
1558 return cret
1559}
1560
1561var xRadialGradientNodeGetEnd func(uintptr) float32
1562
1563// Retrieves the end value for the gradient.
1564func (x *RadialGradientNode) GetEnd() float32 {
1565
1566 cret := xRadialGradientNodeGetEnd(x.GoPointer())
1567 return cret
1568}
1569
1570var xRadialGradientNodeGetHradius func(uintptr) float32
1571
1572// Retrieves the horizontal radius for the gradient.
1573func (x *RadialGradientNode) GetHradius() float32 {
1574
1575 cret := xRadialGradientNodeGetHradius(x.GoPointer())
1576 return cret
1577}
1578
1579var xRadialGradientNodeGetNColorStops func(uintptr) uint
1580
1581// Retrieves the number of color stops in the gradient.
1582func (x *RadialGradientNode) GetNColorStops() uint {
1583
1584 cret := xRadialGradientNodeGetNColorStops(x.GoPointer())
1585 return cret
1586}
1587
1588var xRadialGradientNodeGetStart func(uintptr) float32
1589
1590// Retrieves the start value for the gradient.
1591func (x *RadialGradientNode) GetStart() float32 {
1592
1593 cret := xRadialGradientNodeGetStart(x.GoPointer())
1594 return cret
1595}
1596
1597var xRadialGradientNodeGetVradius func(uintptr) float32
1598
1599// Retrieves the vertical radius for the gradient.
1600func (x *RadialGradientNode) GetVradius() float32 {
1601
1602 cret := xRadialGradientNodeGetVradius(x.GoPointer())
1603 return cret
1604}
1605
1606func (c *RadialGradientNode) GoPointer() uintptr {
1607 if c == nil {
1608 return 0
1609 }
1610 return c.Ptr
1611}
1612
1613func (c *RadialGradientNode) SetGoPointer(ptr uintptr) {
1614 c.Ptr = ptr
1615}
1616
1617// A render node repeating its single child node.
1618type RepeatNode struct {
1619 RenderNode
1620}
1621
1622var xRepeatNodeGLibType func() types.GType
1623
1624func RepeatNodeGLibType() types.GType {
1625 return xRepeatNodeGLibType()
1626}
1627
1628func RepeatNodeNewFromInternalPtr(ptr uintptr) *RepeatNode {
1629 cls := &RepeatNode{}
1630 cls.Ptr = ptr
1631 return cls
1632}
1633
1634var xNewRepeatNode func(*graphene.Rect, uintptr, *graphene.Rect) uintptr
1635
1636// Creates a `GskRenderNode` that will repeat the drawing of @child across
1637// the given @bounds.
1638func NewRepeatNode(BoundsVar *graphene.Rect, ChildVar *RenderNode, ChildBoundsVar *graphene.Rect) *RepeatNode {
1639 var cls *RepeatNode
1640
1641 cret := xNewRepeatNode(BoundsVar, ChildVar.GoPointer(), ChildBoundsVar)
1642
1643 if cret == 0 {
1644 return nil
1645 }
1646 cls = &RepeatNode{}
1647 cls.Ptr = cret
1648 return cls
1649}
1650
1651var xRepeatNodeGetChild func(uintptr) uintptr
1652
1653// Retrieves the child of @node.
1654func (x *RepeatNode) GetChild() *RenderNode {
1655 var cls *RenderNode
1656
1657 cret := xRepeatNodeGetChild(x.GoPointer())
1658
1659 if cret == 0 {
1660 return nil
1661 }
1662 gobject.IncreaseRef(cret)
1663 cls = &RenderNode{}
1664 cls.Ptr = cret
1665 return cls
1666}
1667
1668var xRepeatNodeGetChildBounds func(uintptr) *graphene.Rect
1669
1670// Retrieves the bounding rectangle of the child of @node.
1671func (x *RepeatNode) GetChildBounds() *graphene.Rect {
1672
1673 cret := xRepeatNodeGetChildBounds(x.GoPointer())
1674 return cret
1675}
1676
1677func (c *RepeatNode) GoPointer() uintptr {
1678 if c == nil {
1679 return 0
1680 }
1681 return c.Ptr
1682}
1683
1684func (c *RepeatNode) SetGoPointer(ptr uintptr) {
1685 c.Ptr = ptr
1686}
1687
1688// A render node for a repeating linear gradient.
1689type RepeatingLinearGradientNode struct {
1690 RenderNode
1691}
1692
1693var xRepeatingLinearGradientNodeGLibType func() types.GType
1694
1695func RepeatingLinearGradientNodeGLibType() types.GType {
1696 return xRepeatingLinearGradientNodeGLibType()
1697}
1698
1699func RepeatingLinearGradientNodeNewFromInternalPtr(ptr uintptr) *RepeatingLinearGradientNode {
1700 cls := &RepeatingLinearGradientNode{}
1701 cls.Ptr = ptr
1702 return cls
1703}
1704
1705var xNewRepeatingLinearGradientNode func(*graphene.Rect, *graphene.Point, *graphene.Point, []ColorStop, uint) uintptr
1706
1707// Creates a `GskRenderNode` that will create a repeating linear gradient
1708// from the given points and color stops, and render that into the area
1709// given by @bounds.
1710func NewRepeatingLinearGradientNode(BoundsVar *graphene.Rect, StartVar *graphene.Point, EndVar *graphene.Point, ColorStopsVar []ColorStop, NColorStopsVar uint) *RepeatingLinearGradientNode {
1711 var cls *RepeatingLinearGradientNode
1712
1713 cret := xNewRepeatingLinearGradientNode(BoundsVar, StartVar, EndVar, ColorStopsVar, NColorStopsVar)
1714
1715 if cret == 0 {
1716 return nil
1717 }
1718 cls = &RepeatingLinearGradientNode{}
1719 cls.Ptr = cret
1720 return cls
1721}
1722
1723func (c *RepeatingLinearGradientNode) GoPointer() uintptr {
1724 if c == nil {
1725 return 0
1726 }
1727 return c.Ptr
1728}
1729
1730func (c *RepeatingLinearGradientNode) SetGoPointer(ptr uintptr) {
1731 c.Ptr = ptr
1732}
1733
1734// A render node for a repeating radial gradient.
1735type RepeatingRadialGradientNode struct {
1736 RenderNode
1737}
1738
1739var xRepeatingRadialGradientNodeGLibType func() types.GType
1740
1741func RepeatingRadialGradientNodeGLibType() types.GType {
1742 return xRepeatingRadialGradientNodeGLibType()
1743}
1744
1745func RepeatingRadialGradientNodeNewFromInternalPtr(ptr uintptr) *RepeatingRadialGradientNode {
1746 cls := &RepeatingRadialGradientNode{}
1747 cls.Ptr = ptr
1748 return cls
1749}
1750
1751var xNewRepeatingRadialGradientNode func(*graphene.Rect, *graphene.Point, float32, float32, float32, float32, []ColorStop, uint) uintptr
1752
1753// Creates a `GskRenderNode` that draws a repeating radial gradient.
1754//
1755// The radial gradient starts around @center. The size of the gradient
1756// is dictated by @hradius in horizontal orientation and by @vradius
1757// in vertical orientation.
1758func NewRepeatingRadialGradientNode(BoundsVar *graphene.Rect, CenterVar *graphene.Point, HradiusVar float32, VradiusVar float32, StartVar float32, EndVar float32, ColorStopsVar []ColorStop, NColorStopsVar uint) *RepeatingRadialGradientNode {
1759 var cls *RepeatingRadialGradientNode
1760
1761 cret := xNewRepeatingRadialGradientNode(BoundsVar, CenterVar, HradiusVar, VradiusVar, StartVar, EndVar, ColorStopsVar, NColorStopsVar)
1762
1763 if cret == 0 {
1764 return nil
1765 }
1766 cls = &RepeatingRadialGradientNode{}
1767 cls.Ptr = cret
1768 return cls
1769}
1770
1771func (c *RepeatingRadialGradientNode) GoPointer() uintptr {
1772 if c == nil {
1773 return 0
1774 }
1775 return c.Ptr
1776}
1777
1778func (c *RepeatingRadialGradientNode) SetGoPointer(ptr uintptr) {
1779 c.Ptr = ptr
1780}
1781
1782// A render node applying a rounded rectangle clip to its single child.
1783type RoundedClipNode struct {
1784 RenderNode
1785}
1786
1787var xRoundedClipNodeGLibType func() types.GType
1788
1789func RoundedClipNodeGLibType() types.GType {
1790 return xRoundedClipNodeGLibType()
1791}
1792
1793func RoundedClipNodeNewFromInternalPtr(ptr uintptr) *RoundedClipNode {
1794 cls := &RoundedClipNode{}
1795 cls.Ptr = ptr
1796 return cls
1797}
1798
1799var xNewRoundedClipNode func(uintptr, *RoundedRect) uintptr
1800
1801// Creates a `GskRenderNode` that will clip the @child to the area
1802// given by @clip.
1803func NewRoundedClipNode(ChildVar *RenderNode, ClipVar *RoundedRect) *RoundedClipNode {
1804 var cls *RoundedClipNode
1805
1806 cret := xNewRoundedClipNode(ChildVar.GoPointer(), ClipVar)
1807
1808 if cret == 0 {
1809 return nil
1810 }
1811 cls = &RoundedClipNode{}
1812 cls.Ptr = cret
1813 return cls
1814}
1815
1816var xRoundedClipNodeGetChild func(uintptr) uintptr
1817
1818// Gets the child node that is getting clipped by the given @node.
1819func (x *RoundedClipNode) GetChild() *RenderNode {
1820 var cls *RenderNode
1821
1822 cret := xRoundedClipNodeGetChild(x.GoPointer())
1823
1824 if cret == 0 {
1825 return nil
1826 }
1827 gobject.IncreaseRef(cret)
1828 cls = &RenderNode{}
1829 cls.Ptr = cret
1830 return cls
1831}
1832
1833var xRoundedClipNodeGetClip func(uintptr) *RoundedRect
1834
1835// Retrieves the rounded rectangle used to clip the contents of the @node.
1836func (x *RoundedClipNode) GetClip() *RoundedRect {
1837
1838 cret := xRoundedClipNodeGetClip(x.GoPointer())
1839 return cret
1840}
1841
1842func (c *RoundedClipNode) GoPointer() uintptr {
1843 if c == nil {
1844 return 0
1845 }
1846 return c.Ptr
1847}
1848
1849func (c *RoundedClipNode) SetGoPointer(ptr uintptr) {
1850 c.Ptr = ptr
1851}
1852
1853// A render node drawing one or more shadows behind its single child node.
1854type ShadowNode struct {
1855 RenderNode
1856}
1857
1858var xShadowNodeGLibType func() types.GType
1859
1860func ShadowNodeGLibType() types.GType {
1861 return xShadowNodeGLibType()
1862}
1863
1864func ShadowNodeNewFromInternalPtr(ptr uintptr) *ShadowNode {
1865 cls := &ShadowNode{}
1866 cls.Ptr = ptr
1867 return cls
1868}
1869
1870var xNewShadowNode func(uintptr, []Shadow, uint) uintptr
1871
1872// Creates a `GskRenderNode` that will draw a @child with the given
1873// @shadows below it.
1874func NewShadowNode(ChildVar *RenderNode, ShadowsVar []Shadow, NShadowsVar uint) *ShadowNode {
1875 var cls *ShadowNode
1876
1877 cret := xNewShadowNode(ChildVar.GoPointer(), ShadowsVar, NShadowsVar)
1878
1879 if cret == 0 {
1880 return nil
1881 }
1882 cls = &ShadowNode{}
1883 cls.Ptr = cret
1884 return cls
1885}
1886
1887var xShadowNodeGetChild func(uintptr) uintptr
1888
1889// Retrieves the child `GskRenderNode` of the shadow @node.
1890func (x *ShadowNode) GetChild() *RenderNode {
1891 var cls *RenderNode
1892
1893 cret := xShadowNodeGetChild(x.GoPointer())
1894
1895 if cret == 0 {
1896 return nil
1897 }
1898 gobject.IncreaseRef(cret)
1899 cls = &RenderNode{}
1900 cls.Ptr = cret
1901 return cls
1902}
1903
1904var xShadowNodeGetNShadows func(uintptr) uint
1905
1906// Retrieves the number of shadows in the @node.
1907func (x *ShadowNode) GetNShadows() uint {
1908
1909 cret := xShadowNodeGetNShadows(x.GoPointer())
1910 return cret
1911}
1912
1913var xShadowNodeGetShadow func(uintptr, uint) *Shadow
1914
1915// Retrieves the shadow data at the given index @i.
1916func (x *ShadowNode) GetShadow(IVar uint) *Shadow {
1917
1918 cret := xShadowNodeGetShadow(x.GoPointer(), IVar)
1919 return cret
1920}
1921
1922func (c *ShadowNode) GoPointer() uintptr {
1923 if c == nil {
1924 return 0
1925 }
1926 return c.Ptr
1927}
1928
1929func (c *ShadowNode) SetGoPointer(ptr uintptr) {
1930 c.Ptr = ptr
1931}
1932
1933// A render node that will fill the area determined by stroking the the given
1934// [struct@Gsk.Path] using the [struct@Gsk.Stroke] attributes.
1935type StrokeNode struct {
1936 RenderNode
1937}
1938
1939var xStrokeNodeGLibType func() types.GType
1940
1941func StrokeNodeGLibType() types.GType {
1942 return xStrokeNodeGLibType()
1943}
1944
1945func StrokeNodeNewFromInternalPtr(ptr uintptr) *StrokeNode {
1946 cls := &StrokeNode{}
1947 cls.Ptr = ptr
1948 return cls
1949}
1950
1951var xNewStrokeNode func(uintptr, *Path, *Stroke) uintptr
1952
1953// Creates a #GskRenderNode that will fill the outline generated by stroking
1954// the given @path using the attributes defined in @stroke.
1955//
1956// The area is filled with @child.
1957func NewStrokeNode(ChildVar *RenderNode, PathVar *Path, StrokeVar *Stroke) *StrokeNode {
1958 var cls *StrokeNode
1959
1960 cret := xNewStrokeNode(ChildVar.GoPointer(), PathVar, StrokeVar)
1961
1962 if cret == 0 {
1963 return nil
1964 }
1965 gobject.IncreaseRef(cret)
1966 cls = &StrokeNode{}
1967 cls.Ptr = cret
1968 return cls
1969}
1970
1971var xStrokeNodeGetChild func(uintptr) uintptr
1972
1973// Gets the child node that is getting drawn by the given @node.
1974func (x *StrokeNode) GetChild() *RenderNode {
1975 var cls *RenderNode
1976
1977 cret := xStrokeNodeGetChild(x.GoPointer())
1978
1979 if cret == 0 {
1980 return nil
1981 }
1982 gobject.IncreaseRef(cret)
1983 cls = &RenderNode{}
1984 cls.Ptr = cret
1985 return cls
1986}
1987
1988var xStrokeNodeGetPath func(uintptr) *Path
1989
1990// Retrieves the path that will be stroked with the contents of
1991// the @node.
1992func (x *StrokeNode) GetPath() *Path {
1993
1994 cret := xStrokeNodeGetPath(x.GoPointer())
1995 return cret
1996}
1997
1998var xStrokeNodeGetStroke func(uintptr) *Stroke
1999
2000// Retrieves the stroke attributes used in this @node.
2001func (x *StrokeNode) GetStroke() *Stroke {
2002
2003 cret := xStrokeNodeGetStroke(x.GoPointer())
2004 return cret
2005}
2006
2007func (c *StrokeNode) GoPointer() uintptr {
2008 if c == nil {
2009 return 0
2010 }
2011 return c.Ptr
2012}
2013
2014func (c *StrokeNode) SetGoPointer(ptr uintptr) {
2015 c.Ptr = ptr
2016}
2017
2018// A render node that potentially diverts a part of the scene graph to a subsurface.
2019type SubsurfaceNode struct {
2020 RenderNode
2021}
2022
2023var xSubsurfaceNodeGLibType func() types.GType
2024
2025func SubsurfaceNodeGLibType() types.GType {
2026 return xSubsurfaceNodeGLibType()
2027}
2028
2029func SubsurfaceNodeNewFromInternalPtr(ptr uintptr) *SubsurfaceNode {
2030 cls := &SubsurfaceNode{}
2031 cls.Ptr = ptr
2032 return cls
2033}
2034
2035var xNewSubsurfaceNode func(uintptr, uintptr) uintptr
2036
2037// Creates a `GskRenderNode` that will possibly divert the child
2038// node to a subsurface.
2039//
2040// Note: Since subsurfaces are currently private, these nodes cannot
2041// currently be created outside of GTK. See
2042// [GtkGraphicsOffload](../gtk4/class.GraphicsOffload.html).
2043func NewSubsurfaceNode(ChildVar *RenderNode, SubsurfaceVar uintptr) *SubsurfaceNode {
2044 var cls *SubsurfaceNode
2045
2046 cret := xNewSubsurfaceNode(ChildVar.GoPointer(), SubsurfaceVar)
2047
2048 if cret == 0 {
2049 return nil
2050 }
2051 cls = &SubsurfaceNode{}
2052 cls.Ptr = cret
2053 return cls
2054}
2055
2056var xSubsurfaceNodeGetChild func(uintptr) uintptr
2057
2058// Gets the child node that is getting drawn by the given @node.
2059func (x *SubsurfaceNode) GetChild() *RenderNode {
2060 var cls *RenderNode
2061
2062 cret := xSubsurfaceNodeGetChild(x.GoPointer())
2063
2064 if cret == 0 {
2065 return nil
2066 }
2067 gobject.IncreaseRef(cret)
2068 cls = &RenderNode{}
2069 cls.Ptr = cret
2070 return cls
2071}
2072
2073func (c *SubsurfaceNode) GoPointer() uintptr {
2074 if c == nil {
2075 return 0
2076 }
2077 return c.Ptr
2078}
2079
2080func (c *SubsurfaceNode) SetGoPointer(ptr uintptr) {
2081 c.Ptr = ptr
2082}
2083
2084var xSubsurfaceNodeGetSubsurface func(uintptr) uintptr
2085
2086// Gets the subsurface that was set on this node
2087func SubsurfaceNodeGetSubsurface(NodeVar *DebugNode) uintptr {
2088
2089 cret := xSubsurfaceNodeGetSubsurface(NodeVar.GoPointer())
2090 return cret
2091}
2092
2093// A render node drawing a set of glyphs.
2094type TextNode struct {
2095 RenderNode
2096}
2097
2098var xTextNodeGLibType func() types.GType
2099
2100func TextNodeGLibType() types.GType {
2101 return xTextNodeGLibType()
2102}
2103
2104func TextNodeNewFromInternalPtr(ptr uintptr) *TextNode {
2105 cls := &TextNode{}
2106 cls.Ptr = ptr
2107 return cls
2108}
2109
2110var xNewTextNode func(uintptr, *pango.GlyphString, *gdk.RGBA, *graphene.Point) uintptr
2111
2112// Creates a render node that renders the given glyphs.
2113//
2114// Note that @color may not be used if the font contains
2115// color glyphs.
2116func NewTextNode(FontVar *pango.Font, GlyphsVar *pango.GlyphString, ColorVar *gdk.RGBA, OffsetVar *graphene.Point) *TextNode {
2117 var cls *TextNode
2118
2119 cret := xNewTextNode(FontVar.GoPointer(), GlyphsVar, ColorVar, OffsetVar)
2120
2121 if cret == 0 {
2122 return nil
2123 }
2124 cls = &TextNode{}
2125 cls.Ptr = cret
2126 return cls
2127}
2128
2129var xTextNodeGetColor func(uintptr) *gdk.RGBA
2130
2131// Retrieves the color used by the text @node.
2132//
2133// The value returned by this function will not be correct
2134// if the render node was created for a non-sRGB color.
2135func (x *TextNode) GetColor() *gdk.RGBA {
2136
2137 cret := xTextNodeGetColor(x.GoPointer())
2138 return cret
2139}
2140
2141var xTextNodeGetFont func(uintptr) uintptr
2142
2143// Returns the font used by the text @node.
2144func (x *TextNode) GetFont() *pango.Font {
2145 var cls *pango.Font
2146
2147 cret := xTextNodeGetFont(x.GoPointer())
2148
2149 if cret == 0 {
2150 return nil
2151 }
2152 gobject.IncreaseRef(cret)
2153 cls = &pango.Font{}
2154 cls.Ptr = cret
2155 return cls
2156}
2157
2158var xTextNodeGetGlyphs func(uintptr, *uint) uintptr
2159
2160// Retrieves the glyph information in the @node.
2161func (x *TextNode) GetGlyphs(NGlyphsVar *uint) uintptr {
2162
2163 cret := xTextNodeGetGlyphs(x.GoPointer(), NGlyphsVar)
2164 return cret
2165}
2166
2167var xTextNodeGetNumGlyphs func(uintptr) uint
2168
2169// Retrieves the number of glyphs in the text node.
2170func (x *TextNode) GetNumGlyphs() uint {
2171
2172 cret := xTextNodeGetNumGlyphs(x.GoPointer())
2173 return cret
2174}
2175
2176var xTextNodeGetOffset func(uintptr) *graphene.Point
2177
2178// Retrieves the offset applied to the text.
2179func (x *TextNode) GetOffset() *graphene.Point {
2180
2181 cret := xTextNodeGetOffset(x.GoPointer())
2182 return cret
2183}
2184
2185var xTextNodeHasColorGlyphs func(uintptr) bool
2186
2187// Checks whether the text @node has color glyphs.
2188func (x *TextNode) HasColorGlyphs() bool {
2189
2190 cret := xTextNodeHasColorGlyphs(x.GoPointer())
2191 return cret
2192}
2193
2194func (c *TextNode) GoPointer() uintptr {
2195 if c == nil {
2196 return 0
2197 }
2198 return c.Ptr
2199}
2200
2201func (c *TextNode) SetGoPointer(ptr uintptr) {
2202 c.Ptr = ptr
2203}
2204
2205// A render node for a `GdkTexture`.
2206type TextureNode struct {
2207 RenderNode
2208}
2209
2210var xTextureNodeGLibType func() types.GType
2211
2212func TextureNodeGLibType() types.GType {
2213 return xTextureNodeGLibType()
2214}
2215
2216func TextureNodeNewFromInternalPtr(ptr uintptr) *TextureNode {
2217 cls := &TextureNode{}
2218 cls.Ptr = ptr
2219 return cls
2220}
2221
2222var xNewTextureNode func(uintptr, *graphene.Rect) uintptr
2223
2224// Creates a `GskRenderNode` that will render the given
2225// @texture into the area given by @bounds.
2226//
2227// Note that GSK applies linear filtering when textures are
2228// scaled and transformed. See [class@Gsk.TextureScaleNode]
2229// for a way to influence filtering.
2230func NewTextureNode(TextureVar *gdk.Texture, BoundsVar *graphene.Rect) *TextureNode {
2231 var cls *TextureNode
2232
2233 cret := xNewTextureNode(TextureVar.GoPointer(), BoundsVar)
2234
2235 if cret == 0 {
2236 return nil
2237 }
2238 cls = &TextureNode{}
2239 cls.Ptr = cret
2240 return cls
2241}
2242
2243var xTextureNodeGetTexture func(uintptr) uintptr
2244
2245// Retrieves the `GdkTexture` used when creating this `GskRenderNode`.
2246func (x *TextureNode) GetTexture() *gdk.Texture {
2247 var cls *gdk.Texture
2248
2249 cret := xTextureNodeGetTexture(x.GoPointer())
2250
2251 if cret == 0 {
2252 return nil
2253 }
2254 gobject.IncreaseRef(cret)
2255 cls = &gdk.Texture{}
2256 cls.Ptr = cret
2257 return cls
2258}
2259
2260func (c *TextureNode) GoPointer() uintptr {
2261 if c == nil {
2262 return 0
2263 }
2264 return c.Ptr
2265}
2266
2267func (c *TextureNode) SetGoPointer(ptr uintptr) {
2268 c.Ptr = ptr
2269}
2270
2271// A render node for a `GdkTexture`, with control over scaling.
2272type TextureScaleNode struct {
2273 RenderNode
2274}
2275
2276var xTextureScaleNodeGLibType func() types.GType
2277
2278func TextureScaleNodeGLibType() types.GType {
2279 return xTextureScaleNodeGLibType()
2280}
2281
2282func TextureScaleNodeNewFromInternalPtr(ptr uintptr) *TextureScaleNode {
2283 cls := &TextureScaleNode{}
2284 cls.Ptr = ptr
2285 return cls
2286}
2287
2288var xNewTextureScaleNode func(uintptr, *graphene.Rect, ScalingFilter) uintptr
2289
2290// Creates a node that scales the texture to the size given by the
2291// bounds using the filter and then places it at the bounds' position.
2292//
2293// Note that further scaling and other transformations which are
2294// applied to the node will apply linear filtering to the resulting
2295// texture, as usual.
2296//
2297// This node is intended for tight control over scaling applied
2298// to a texture, such as in image editors and requires the
2299// application to be aware of the whole render tree as further
2300// transforms may be applied that conflict with the desired effect
2301// of this node.
2302func NewTextureScaleNode(TextureVar *gdk.Texture, BoundsVar *graphene.Rect, FilterVar ScalingFilter) *TextureScaleNode {
2303 var cls *TextureScaleNode
2304
2305 cret := xNewTextureScaleNode(TextureVar.GoPointer(), BoundsVar, FilterVar)
2306
2307 if cret == 0 {
2308 return nil
2309 }
2310 cls = &TextureScaleNode{}
2311 cls.Ptr = cret
2312 return cls
2313}
2314
2315var xTextureScaleNodeGetFilter func(uintptr) ScalingFilter
2316
2317// Retrieves the `GskScalingFilter` used when creating this `GskRenderNode`.
2318func (x *TextureScaleNode) GetFilter() ScalingFilter {
2319
2320 cret := xTextureScaleNodeGetFilter(x.GoPointer())
2321 return cret
2322}
2323
2324var xTextureScaleNodeGetTexture func(uintptr) uintptr
2325
2326// Retrieves the `GdkTexture` used when creating this `GskRenderNode`.
2327func (x *TextureScaleNode) GetTexture() *gdk.Texture {
2328 var cls *gdk.Texture
2329
2330 cret := xTextureScaleNodeGetTexture(x.GoPointer())
2331
2332 if cret == 0 {
2333 return nil
2334 }
2335 gobject.IncreaseRef(cret)
2336 cls = &gdk.Texture{}
2337 cls.Ptr = cret
2338 return cls
2339}
2340
2341func (c *TextureScaleNode) GoPointer() uintptr {
2342 if c == nil {
2343 return 0
2344 }
2345 return c.Ptr
2346}
2347
2348func (c *TextureScaleNode) SetGoPointer(ptr uintptr) {
2349 c.Ptr = ptr
2350}
2351
2352// A render node applying a `GskTransform` to its single child node.
2353type TransformNode struct {
2354 RenderNode
2355}
2356
2357var xTransformNodeGLibType func() types.GType
2358
2359func TransformNodeGLibType() types.GType {
2360 return xTransformNodeGLibType()
2361}
2362
2363func TransformNodeNewFromInternalPtr(ptr uintptr) *TransformNode {
2364 cls := &TransformNode{}
2365 cls.Ptr = ptr
2366 return cls
2367}
2368
2369var xNewTransformNode func(uintptr, *Transform) uintptr
2370
2371// Creates a `GskRenderNode` that will transform the given @child
2372// with the given @transform.
2373func NewTransformNode(ChildVar *RenderNode, TransformVar *Transform) *TransformNode {
2374 var cls *TransformNode
2375
2376 cret := xNewTransformNode(ChildVar.GoPointer(), TransformVar)
2377
2378 if cret == 0 {
2379 return nil
2380 }
2381 cls = &TransformNode{}
2382 cls.Ptr = cret
2383 return cls
2384}
2385
2386var xTransformNodeGetChild func(uintptr) uintptr
2387
2388// Gets the child node that is getting transformed by the given @node.
2389func (x *TransformNode) GetChild() *RenderNode {
2390 var cls *RenderNode
2391
2392 cret := xTransformNodeGetChild(x.GoPointer())
2393
2394 if cret == 0 {
2395 return nil
2396 }
2397 gobject.IncreaseRef(cret)
2398 cls = &RenderNode{}
2399 cls.Ptr = cret
2400 return cls
2401}
2402
2403var xTransformNodeGetTransform func(uintptr) *Transform
2404
2405// Retrieves the `GskTransform` used by the @node.
2406func (x *TransformNode) GetTransform() *Transform {
2407
2408 cret := xTransformNodeGetTransform(x.GoPointer())
2409 return cret
2410}
2411
2412func (c *TransformNode) GoPointer() uintptr {
2413 if c == nil {
2414 return 0
2415 }
2416 return c.Ptr
2417}
2418
2419func (c *TransformNode) SetGoPointer(ptr uintptr) {
2420 c.Ptr = ptr
2421}
2422
2423func init() {
2424 core.SetPackageName("GSK", "gtk4")
2425 core.SetSharedLibraries("GSK", []string{"libgtk-4.so.1"})
2426 var libs []uintptr
2427 for _, libPath := range core.GetPaths("GSK") {
2428 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
2429 if err != nil {
2430 panic(err)
2431 }
2432 libs = append(libs, lib)
2433 }
2434
2435 core.PuregoSafeRegister(&xBlendNodeGLibType, libs, "gsk_blend_node_get_type")
2436
2437 core.PuregoSafeRegister(&xNewBlendNode, libs, "gsk_blend_node_new")
2438
2439 core.PuregoSafeRegister(&xBlendNodeGetBlendMode, libs, "gsk_blend_node_get_blend_mode")
2440 core.PuregoSafeRegister(&xBlendNodeGetBottomChild, libs, "gsk_blend_node_get_bottom_child")
2441 core.PuregoSafeRegister(&xBlendNodeGetTopChild, libs, "gsk_blend_node_get_top_child")
2442
2443 core.PuregoSafeRegister(&xBlurNodeGLibType, libs, "gsk_blur_node_get_type")
2444
2445 core.PuregoSafeRegister(&xNewBlurNode, libs, "gsk_blur_node_new")
2446
2447 core.PuregoSafeRegister(&xBlurNodeGetChild, libs, "gsk_blur_node_get_child")
2448 core.PuregoSafeRegister(&xBlurNodeGetRadius, libs, "gsk_blur_node_get_radius")
2449
2450 core.PuregoSafeRegister(&xBorderNodeGLibType, libs, "gsk_border_node_get_type")
2451
2452 core.PuregoSafeRegister(&xNewBorderNode, libs, "gsk_border_node_new")
2453
2454 core.PuregoSafeRegister(&xBorderNodeGetColors, libs, "gsk_border_node_get_colors")
2455 core.PuregoSafeRegister(&xBorderNodeGetOutline, libs, "gsk_border_node_get_outline")
2456 core.PuregoSafeRegister(&xBorderNodeGetWidths, libs, "gsk_border_node_get_widths")
2457
2458 core.PuregoSafeRegister(&xCairoNodeGLibType, libs, "gsk_cairo_node_get_type")
2459
2460 core.PuregoSafeRegister(&xNewCairoNode, libs, "gsk_cairo_node_new")
2461
2462 core.PuregoSafeRegister(&xCairoNodeGetDrawContext, libs, "gsk_cairo_node_get_draw_context")
2463 core.PuregoSafeRegister(&xCairoNodeGetSurface, libs, "gsk_cairo_node_get_surface")
2464
2465 core.PuregoSafeRegister(&xClipNodeGLibType, libs, "gsk_clip_node_get_type")
2466
2467 core.PuregoSafeRegister(&xNewClipNode, libs, "gsk_clip_node_new")
2468
2469 core.PuregoSafeRegister(&xClipNodeGetChild, libs, "gsk_clip_node_get_child")
2470 core.PuregoSafeRegister(&xClipNodeGetClip, libs, "gsk_clip_node_get_clip")
2471
2472 core.PuregoSafeRegister(&xColorMatrixNodeGLibType, libs, "gsk_color_matrix_node_get_type")
2473
2474 core.PuregoSafeRegister(&xNewColorMatrixNode, libs, "gsk_color_matrix_node_new")
2475
2476 core.PuregoSafeRegister(&xColorMatrixNodeGetChild, libs, "gsk_color_matrix_node_get_child")
2477 core.PuregoSafeRegister(&xColorMatrixNodeGetColorMatrix, libs, "gsk_color_matrix_node_get_color_matrix")
2478 core.PuregoSafeRegister(&xColorMatrixNodeGetColorOffset, libs, "gsk_color_matrix_node_get_color_offset")
2479
2480 core.PuregoSafeRegister(&xColorNodeGLibType, libs, "gsk_color_node_get_type")
2481
2482 core.PuregoSafeRegister(&xNewColorNode, libs, "gsk_color_node_new")
2483
2484 core.PuregoSafeRegister(&xColorNodeGetColor, libs, "gsk_color_node_get_color")
2485
2486 core.PuregoSafeRegister(&xConicGradientNodeGLibType, libs, "gsk_conic_gradient_node_get_type")
2487
2488 core.PuregoSafeRegister(&xNewConicGradientNode, libs, "gsk_conic_gradient_node_new")
2489
2490 core.PuregoSafeRegister(&xConicGradientNodeGetAngle, libs, "gsk_conic_gradient_node_get_angle")
2491 core.PuregoSafeRegister(&xConicGradientNodeGetCenter, libs, "gsk_conic_gradient_node_get_center")
2492 core.PuregoSafeRegister(&xConicGradientNodeGetColorStops, libs, "gsk_conic_gradient_node_get_color_stops")
2493 core.PuregoSafeRegister(&xConicGradientNodeGetNColorStops, libs, "gsk_conic_gradient_node_get_n_color_stops")
2494 core.PuregoSafeRegister(&xConicGradientNodeGetRotation, libs, "gsk_conic_gradient_node_get_rotation")
2495
2496 core.PuregoSafeRegister(&xContainerNodeGLibType, libs, "gsk_container_node_get_type")
2497
2498 core.PuregoSafeRegister(&xNewContainerNode, libs, "gsk_container_node_new")
2499
2500 core.PuregoSafeRegister(&xContainerNodeGetChild, libs, "gsk_container_node_get_child")
2501 core.PuregoSafeRegister(&xContainerNodeGetNChildren, libs, "gsk_container_node_get_n_children")
2502
2503 core.PuregoSafeRegister(&xCrossFadeNodeGLibType, libs, "gsk_cross_fade_node_get_type")
2504
2505 core.PuregoSafeRegister(&xNewCrossFadeNode, libs, "gsk_cross_fade_node_new")
2506
2507 core.PuregoSafeRegister(&xCrossFadeNodeGetEndChild, libs, "gsk_cross_fade_node_get_end_child")
2508 core.PuregoSafeRegister(&xCrossFadeNodeGetProgress, libs, "gsk_cross_fade_node_get_progress")
2509 core.PuregoSafeRegister(&xCrossFadeNodeGetStartChild, libs, "gsk_cross_fade_node_get_start_child")
2510
2511 core.PuregoSafeRegister(&xDebugNodeGLibType, libs, "gsk_debug_node_get_type")
2512
2513 core.PuregoSafeRegister(&xNewDebugNode, libs, "gsk_debug_node_new")
2514
2515 core.PuregoSafeRegister(&xDebugNodeGetChild, libs, "gsk_debug_node_get_child")
2516 core.PuregoSafeRegister(&xDebugNodeGetMessage, libs, "gsk_debug_node_get_message")
2517
2518 core.PuregoSafeRegister(&xFillNodeGLibType, libs, "gsk_fill_node_get_type")
2519
2520 core.PuregoSafeRegister(&xNewFillNode, libs, "gsk_fill_node_new")
2521
2522 core.PuregoSafeRegister(&xFillNodeGetChild, libs, "gsk_fill_node_get_child")
2523 core.PuregoSafeRegister(&xFillNodeGetFillRule, libs, "gsk_fill_node_get_fill_rule")
2524 core.PuregoSafeRegister(&xFillNodeGetPath, libs, "gsk_fill_node_get_path")
2525
2526 core.PuregoSafeRegister(&xGLShaderNodeGLibType, libs, "gsk_gl_shader_node_get_type")
2527
2528 core.PuregoSafeRegister(&xNewGLShaderNode, libs, "gsk_gl_shader_node_new")
2529
2530 core.PuregoSafeRegister(&xGLShaderNodeGetArgs, libs, "gsk_gl_shader_node_get_args")
2531 core.PuregoSafeRegister(&xGLShaderNodeGetChild, libs, "gsk_gl_shader_node_get_child")
2532 core.PuregoSafeRegister(&xGLShaderNodeGetNChildren, libs, "gsk_gl_shader_node_get_n_children")
2533 core.PuregoSafeRegister(&xGLShaderNodeGetShader, libs, "gsk_gl_shader_node_get_shader")
2534
2535 core.PuregoSafeRegister(&xInsetShadowNodeGLibType, libs, "gsk_inset_shadow_node_get_type")
2536
2537 core.PuregoSafeRegister(&xNewInsetShadowNode, libs, "gsk_inset_shadow_node_new")
2538
2539 core.PuregoSafeRegister(&xInsetShadowNodeGetBlurRadius, libs, "gsk_inset_shadow_node_get_blur_radius")
2540 core.PuregoSafeRegister(&xInsetShadowNodeGetColor, libs, "gsk_inset_shadow_node_get_color")
2541 core.PuregoSafeRegister(&xInsetShadowNodeGetDx, libs, "gsk_inset_shadow_node_get_dx")
2542 core.PuregoSafeRegister(&xInsetShadowNodeGetDy, libs, "gsk_inset_shadow_node_get_dy")
2543 core.PuregoSafeRegister(&xInsetShadowNodeGetOutline, libs, "gsk_inset_shadow_node_get_outline")
2544 core.PuregoSafeRegister(&xInsetShadowNodeGetSpread, libs, "gsk_inset_shadow_node_get_spread")
2545
2546 core.PuregoSafeRegister(&xLinearGradientNodeGLibType, libs, "gsk_linear_gradient_node_get_type")
2547
2548 core.PuregoSafeRegister(&xNewLinearGradientNode, libs, "gsk_linear_gradient_node_new")
2549
2550 core.PuregoSafeRegister(&xLinearGradientNodeGetColorStops, libs, "gsk_linear_gradient_node_get_color_stops")
2551 core.PuregoSafeRegister(&xLinearGradientNodeGetEnd, libs, "gsk_linear_gradient_node_get_end")
2552 core.PuregoSafeRegister(&xLinearGradientNodeGetNColorStops, libs, "gsk_linear_gradient_node_get_n_color_stops")
2553 core.PuregoSafeRegister(&xLinearGradientNodeGetStart, libs, "gsk_linear_gradient_node_get_start")
2554
2555 core.PuregoSafeRegister(&xMaskNodeGLibType, libs, "gsk_mask_node_get_type")
2556
2557 core.PuregoSafeRegister(&xNewMaskNode, libs, "gsk_mask_node_new")
2558
2559 core.PuregoSafeRegister(&xMaskNodeGetMask, libs, "gsk_mask_node_get_mask")
2560 core.PuregoSafeRegister(&xMaskNodeGetMaskMode, libs, "gsk_mask_node_get_mask_mode")
2561 core.PuregoSafeRegister(&xMaskNodeGetSource, libs, "gsk_mask_node_get_source")
2562
2563 core.PuregoSafeRegister(&xOpacityNodeGLibType, libs, "gsk_opacity_node_get_type")
2564
2565 core.PuregoSafeRegister(&xNewOpacityNode, libs, "gsk_opacity_node_new")
2566
2567 core.PuregoSafeRegister(&xOpacityNodeGetChild, libs, "gsk_opacity_node_get_child")
2568 core.PuregoSafeRegister(&xOpacityNodeGetOpacity, libs, "gsk_opacity_node_get_opacity")
2569
2570 core.PuregoSafeRegister(&xOutsetShadowNodeGLibType, libs, "gsk_outset_shadow_node_get_type")
2571
2572 core.PuregoSafeRegister(&xNewOutsetShadowNode, libs, "gsk_outset_shadow_node_new")
2573
2574 core.PuregoSafeRegister(&xOutsetShadowNodeGetBlurRadius, libs, "gsk_outset_shadow_node_get_blur_radius")
2575 core.PuregoSafeRegister(&xOutsetShadowNodeGetColor, libs, "gsk_outset_shadow_node_get_color")
2576 core.PuregoSafeRegister(&xOutsetShadowNodeGetDx, libs, "gsk_outset_shadow_node_get_dx")
2577 core.PuregoSafeRegister(&xOutsetShadowNodeGetDy, libs, "gsk_outset_shadow_node_get_dy")
2578 core.PuregoSafeRegister(&xOutsetShadowNodeGetOutline, libs, "gsk_outset_shadow_node_get_outline")
2579 core.PuregoSafeRegister(&xOutsetShadowNodeGetSpread, libs, "gsk_outset_shadow_node_get_spread")
2580
2581 core.PuregoSafeRegister(&xRadialGradientNodeGLibType, libs, "gsk_radial_gradient_node_get_type")
2582
2583 core.PuregoSafeRegister(&xNewRadialGradientNode, libs, "gsk_radial_gradient_node_new")
2584
2585 core.PuregoSafeRegister(&xRadialGradientNodeGetCenter, libs, "gsk_radial_gradient_node_get_center")
2586 core.PuregoSafeRegister(&xRadialGradientNodeGetColorStops, libs, "gsk_radial_gradient_node_get_color_stops")
2587 core.PuregoSafeRegister(&xRadialGradientNodeGetEnd, libs, "gsk_radial_gradient_node_get_end")
2588 core.PuregoSafeRegister(&xRadialGradientNodeGetHradius, libs, "gsk_radial_gradient_node_get_hradius")
2589 core.PuregoSafeRegister(&xRadialGradientNodeGetNColorStops, libs, "gsk_radial_gradient_node_get_n_color_stops")
2590 core.PuregoSafeRegister(&xRadialGradientNodeGetStart, libs, "gsk_radial_gradient_node_get_start")
2591 core.PuregoSafeRegister(&xRadialGradientNodeGetVradius, libs, "gsk_radial_gradient_node_get_vradius")
2592
2593 core.PuregoSafeRegister(&xRepeatNodeGLibType, libs, "gsk_repeat_node_get_type")
2594
2595 core.PuregoSafeRegister(&xNewRepeatNode, libs, "gsk_repeat_node_new")
2596
2597 core.PuregoSafeRegister(&xRepeatNodeGetChild, libs, "gsk_repeat_node_get_child")
2598 core.PuregoSafeRegister(&xRepeatNodeGetChildBounds, libs, "gsk_repeat_node_get_child_bounds")
2599
2600 core.PuregoSafeRegister(&xRepeatingLinearGradientNodeGLibType, libs, "gsk_repeating_linear_gradient_node_get_type")
2601
2602 core.PuregoSafeRegister(&xNewRepeatingLinearGradientNode, libs, "gsk_repeating_linear_gradient_node_new")
2603
2604 core.PuregoSafeRegister(&xRepeatingRadialGradientNodeGLibType, libs, "gsk_repeating_radial_gradient_node_get_type")
2605
2606 core.PuregoSafeRegister(&xNewRepeatingRadialGradientNode, libs, "gsk_repeating_radial_gradient_node_new")
2607
2608 core.PuregoSafeRegister(&xRoundedClipNodeGLibType, libs, "gsk_rounded_clip_node_get_type")
2609
2610 core.PuregoSafeRegister(&xNewRoundedClipNode, libs, "gsk_rounded_clip_node_new")
2611
2612 core.PuregoSafeRegister(&xRoundedClipNodeGetChild, libs, "gsk_rounded_clip_node_get_child")
2613 core.PuregoSafeRegister(&xRoundedClipNodeGetClip, libs, "gsk_rounded_clip_node_get_clip")
2614
2615 core.PuregoSafeRegister(&xShadowNodeGLibType, libs, "gsk_shadow_node_get_type")
2616
2617 core.PuregoSafeRegister(&xNewShadowNode, libs, "gsk_shadow_node_new")
2618
2619 core.PuregoSafeRegister(&xShadowNodeGetChild, libs, "gsk_shadow_node_get_child")
2620 core.PuregoSafeRegister(&xShadowNodeGetNShadows, libs, "gsk_shadow_node_get_n_shadows")
2621 core.PuregoSafeRegister(&xShadowNodeGetShadow, libs, "gsk_shadow_node_get_shadow")
2622
2623 core.PuregoSafeRegister(&xStrokeNodeGLibType, libs, "gsk_stroke_node_get_type")
2624
2625 core.PuregoSafeRegister(&xNewStrokeNode, libs, "gsk_stroke_node_new")
2626
2627 core.PuregoSafeRegister(&xStrokeNodeGetChild, libs, "gsk_stroke_node_get_child")
2628 core.PuregoSafeRegister(&xStrokeNodeGetPath, libs, "gsk_stroke_node_get_path")
2629 core.PuregoSafeRegister(&xStrokeNodeGetStroke, libs, "gsk_stroke_node_get_stroke")
2630
2631 core.PuregoSafeRegister(&xSubsurfaceNodeGLibType, libs, "gsk_subsurface_node_get_type")
2632
2633 core.PuregoSafeRegister(&xNewSubsurfaceNode, libs, "gsk_subsurface_node_new")
2634
2635 core.PuregoSafeRegister(&xSubsurfaceNodeGetChild, libs, "gsk_subsurface_node_get_child")
2636
2637 core.PuregoSafeRegister(&xSubsurfaceNodeGetSubsurface, libs, "gsk_subsurface_node_get_subsurface")
2638
2639 core.PuregoSafeRegister(&xTextNodeGLibType, libs, "gsk_text_node_get_type")
2640
2641 core.PuregoSafeRegister(&xNewTextNode, libs, "gsk_text_node_new")
2642
2643 core.PuregoSafeRegister(&xTextNodeGetColor, libs, "gsk_text_node_get_color")
2644 core.PuregoSafeRegister(&xTextNodeGetFont, libs, "gsk_text_node_get_font")
2645 core.PuregoSafeRegister(&xTextNodeGetGlyphs, libs, "gsk_text_node_get_glyphs")
2646 core.PuregoSafeRegister(&xTextNodeGetNumGlyphs, libs, "gsk_text_node_get_num_glyphs")
2647 core.PuregoSafeRegister(&xTextNodeGetOffset, libs, "gsk_text_node_get_offset")
2648 core.PuregoSafeRegister(&xTextNodeHasColorGlyphs, libs, "gsk_text_node_has_color_glyphs")
2649
2650 core.PuregoSafeRegister(&xTextureNodeGLibType, libs, "gsk_texture_node_get_type")
2651
2652 core.PuregoSafeRegister(&xNewTextureNode, libs, "gsk_texture_node_new")
2653
2654 core.PuregoSafeRegister(&xTextureNodeGetTexture, libs, "gsk_texture_node_get_texture")
2655
2656 core.PuregoSafeRegister(&xTextureScaleNodeGLibType, libs, "gsk_texture_scale_node_get_type")
2657
2658 core.PuregoSafeRegister(&xNewTextureScaleNode, libs, "gsk_texture_scale_node_new")
2659
2660 core.PuregoSafeRegister(&xTextureScaleNodeGetFilter, libs, "gsk_texture_scale_node_get_filter")
2661 core.PuregoSafeRegister(&xTextureScaleNodeGetTexture, libs, "gsk_texture_scale_node_get_texture")
2662
2663 core.PuregoSafeRegister(&xTransformNodeGLibType, libs, "gsk_transform_node_get_type")
2664
2665 core.PuregoSafeRegister(&xNewTransformNode, libs, "gsk_transform_node_new")
2666
2667 core.PuregoSafeRegister(&xTransformNodeGetChild, libs, "gsk_transform_node_get_child")
2668 core.PuregoSafeRegister(&xTransformNodeGetTransform, libs, "gsk_transform_node_get_transform")
2669
2670}