/
hdy-carousel-indicator-lines.go
142 lines (113 loc) · 3.71 KB
/
hdy-carousel-indicator-lines.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// Code generated by girgen. DO NOT EDIT.
package handy
import (
"runtime"
"unsafe"
"github.com/diamondburned/gotk4/pkg/atk"
externglib "github.com/diamondburned/gotk4/pkg/core/glib"
"github.com/diamondburned/gotk4/pkg/gtk/v3"
)
// #include <stdlib.h>
// #include <glib-object.h>
// #include <handy.h>
import "C"
// glib.Type values for hdy-carousel-indicator-lines.go.
var GTypeCarouselIndicatorLines = externglib.Type(C.hdy_carousel_indicator_lines_get_type())
func init() {
externglib.RegisterGValueMarshalers([]externglib.TypeMarshaler{
{T: GTypeCarouselIndicatorLines, F: marshalCarouselIndicatorLines},
})
}
// CarouselIndicatorLinesOverrider contains methods that are overridable.
type CarouselIndicatorLinesOverrider interface {
}
type CarouselIndicatorLines struct {
_ [0]func() // equal guard
gtk.DrawingArea
*externglib.Object
gtk.Orientable
}
var (
_ externglib.Objector = (*CarouselIndicatorLines)(nil)
_ gtk.Widgetter = (*CarouselIndicatorLines)(nil)
)
func classInitCarouselIndicatorLinesser(gclassPtr, data C.gpointer) {
C.g_type_class_add_private(gclassPtr, C.gsize(unsafe.Sizeof(uintptr(0))))
goffset := C.g_type_class_get_instance_private_offset(gclassPtr)
*(*C.gpointer)(unsafe.Add(unsafe.Pointer(gclassPtr), goffset)) = data
}
func wrapCarouselIndicatorLines(obj *externglib.Object) *CarouselIndicatorLines {
return &CarouselIndicatorLines{
DrawingArea: gtk.DrawingArea{
Widget: gtk.Widget{
InitiallyUnowned: externglib.InitiallyUnowned{
Object: obj,
},
Object: obj,
ImplementorIface: atk.ImplementorIface{
Object: obj,
},
Buildable: gtk.Buildable{
Object: obj,
},
},
},
Object: obj,
Orientable: gtk.Orientable{
Object: obj,
},
}
}
func marshalCarouselIndicatorLines(p uintptr) (interface{}, error) {
return wrapCarouselIndicatorLines(externglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}
// NewCarouselIndicatorLines: create a new CarouselIndicatorLines widget.
//
// The function returns the following values:
//
// - carouselIndicatorLines: newly created CarouselIndicatorLines widget.
//
func NewCarouselIndicatorLines() *CarouselIndicatorLines {
var _cret *C.GtkWidget // in
_cret = C.hdy_carousel_indicator_lines_new()
var _carouselIndicatorLines *CarouselIndicatorLines // out
_carouselIndicatorLines = wrapCarouselIndicatorLines(externglib.AssumeOwnership(unsafe.Pointer(_cret)))
return _carouselIndicatorLines
}
// Carousel: get the Carousel the indicator uses.
//
// See: hdy_carousel_indicator_lines_set_carousel().
//
// The function returns the following values:
//
// - carousel (optional) or NULL if none has been set.
//
func (self *CarouselIndicatorLines) Carousel() *Carousel {
var _arg0 *C.HdyCarouselIndicatorLines // out
var _cret *C.HdyCarousel // in
_arg0 = (*C.HdyCarouselIndicatorLines)(unsafe.Pointer(externglib.InternObject(self).Native()))
_cret = C.hdy_carousel_indicator_lines_get_carousel(_arg0)
runtime.KeepAlive(self)
var _carousel *Carousel // out
if _cret != nil {
_carousel = wrapCarousel(externglib.Take(unsafe.Pointer(_cret)))
}
return _carousel
}
// SetCarousel sets the Carousel to use.
//
// The function takes the following parameters:
//
// - carousel (optional): Carousel.
//
func (self *CarouselIndicatorLines) SetCarousel(carousel *Carousel) {
var _arg0 *C.HdyCarouselIndicatorLines // out
var _arg1 *C.HdyCarousel // out
_arg0 = (*C.HdyCarouselIndicatorLines)(unsafe.Pointer(externglib.InternObject(self).Native()))
if carousel != nil {
_arg1 = (*C.HdyCarousel)(unsafe.Pointer(externglib.InternObject(carousel).Native()))
}
C.hdy_carousel_indicator_lines_set_carousel(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(carousel)
}