-
Notifications
You must be signed in to change notification settings - Fork 6
/
adw-carousel-indicator-lines.go
189 lines (157 loc) · 5.12 KB
/
adw-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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
// Code generated by girgen. DO NOT EDIT.
package adw
import (
"runtime"
"unsafe"
"github.com/diamondburned/gotk4/pkg/core/gextras"
coreglib "github.com/diamondburned/gotk4/pkg/core/glib"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
// #include <stdlib.h>
// #include <adwaita.h>
// #include <glib-object.h>
import "C"
// GType values.
var (
GTypeCarouselIndicatorLines = coreglib.Type(C.adw_carousel_indicator_lines_get_type())
)
func init() {
coreglib.RegisterGValueMarshalers([]coreglib.TypeMarshaler{
coreglib.TypeMarshaler{T: GTypeCarouselIndicatorLines, F: marshalCarouselIndicatorLines},
})
}
// CarouselIndicatorLinesOverrides contains methods that are overridable.
type CarouselIndicatorLinesOverrides struct {
}
func defaultCarouselIndicatorLinesOverrides(v *CarouselIndicatorLines) CarouselIndicatorLinesOverrides {
return CarouselIndicatorLinesOverrides{}
}
// CarouselIndicatorLines lines indicator for carousel.
//
// <picture> <source srcset="carousel-indicator-dots-lines.png"
// media="(prefers-color-scheme: dark)"> <img src="carousel-indicator-lines.png"
// alt="carousel-indicator-lines"> </picture>
//
// The AdwCarouselIndicatorLines widget shows a set of lines for each page of
// a given carousel. The carousel's active page is shown as another line that
// moves between them to match the carousel's position.
//
// See also carouselindicatordots.
//
// # CSS nodes
//
// AdwCarouselIndicatorLines has a single CSS node with name
// carouselindicatorlines.
type CarouselIndicatorLines struct {
_ [0]func() // equal guard
gtk.Widget
*coreglib.Object
gtk.Orientable
}
var (
_ gtk.Widgetter = (*CarouselIndicatorLines)(nil)
_ coreglib.Objector = (*CarouselIndicatorLines)(nil)
)
func init() {
coreglib.RegisterClassInfo[*CarouselIndicatorLines, *CarouselIndicatorLinesClass, CarouselIndicatorLinesOverrides](
GTypeCarouselIndicatorLines,
initCarouselIndicatorLinesClass,
wrapCarouselIndicatorLines,
defaultCarouselIndicatorLinesOverrides,
)
}
func initCarouselIndicatorLinesClass(gclass unsafe.Pointer, overrides CarouselIndicatorLinesOverrides, classInitFunc func(*CarouselIndicatorLinesClass)) {
if classInitFunc != nil {
class := (*CarouselIndicatorLinesClass)(gextras.NewStructNative(gclass))
classInitFunc(class)
}
}
func wrapCarouselIndicatorLines(obj *coreglib.Object) *CarouselIndicatorLines {
return &CarouselIndicatorLines{
Widget: gtk.Widget{
InitiallyUnowned: coreglib.InitiallyUnowned{
Object: obj,
},
Object: obj,
Accessible: gtk.Accessible{
Object: obj,
},
Buildable: gtk.Buildable{
Object: obj,
},
ConstraintTarget: gtk.ConstraintTarget{
Object: obj,
},
},
Object: obj,
Orientable: gtk.Orientable{
Object: obj,
},
}
}
func marshalCarouselIndicatorLines(p uintptr) (interface{}, error) {
return wrapCarouselIndicatorLines(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}
// NewCarouselIndicatorLines creates a new AdwCarouselIndicatorLines.
//
// The function returns the following values:
//
// - carouselIndicatorLines: newly created AdwCarouselIndicatorLines.
//
func NewCarouselIndicatorLines() *CarouselIndicatorLines {
var _cret *C.GtkWidget // in
_cret = C.adw_carousel_indicator_lines_new()
var _carouselIndicatorLines *CarouselIndicatorLines // out
_carouselIndicatorLines = wrapCarouselIndicatorLines(coreglib.Take(unsafe.Pointer(_cret)))
return _carouselIndicatorLines
}
// Carousel gets the displayed carousel.
//
// The function returns the following values:
//
// - carousel (optional): displayed carousel.
//
func (self *CarouselIndicatorLines) Carousel() *Carousel {
var _arg0 *C.AdwCarouselIndicatorLines // out
var _cret *C.AdwCarousel // in
_arg0 = (*C.AdwCarouselIndicatorLines)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_carousel_indicator_lines_get_carousel(_arg0)
runtime.KeepAlive(self)
var _carousel *Carousel // out
if _cret != nil {
_carousel = wrapCarousel(coreglib.Take(unsafe.Pointer(_cret)))
}
return _carousel
}
// SetCarousel sets the displayed carousel.
//
// The function takes the following parameters:
//
// - carousel (optional): carousel.
//
func (self *CarouselIndicatorLines) SetCarousel(carousel *Carousel) {
var _arg0 *C.AdwCarouselIndicatorLines // out
var _arg1 *C.AdwCarousel // out
_arg0 = (*C.AdwCarouselIndicatorLines)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if carousel != nil {
_arg1 = (*C.AdwCarousel)(unsafe.Pointer(coreglib.InternObject(carousel).Native()))
}
C.adw_carousel_indicator_lines_set_carousel(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(carousel)
}
// CarouselIndicatorLinesClass: instance of this type is always passed by
// reference.
type CarouselIndicatorLinesClass struct {
*carouselIndicatorLinesClass
}
// carouselIndicatorLinesClass is the struct that's finalized.
type carouselIndicatorLinesClass struct {
native *C.AdwCarouselIndicatorLinesClass
}
func (c *CarouselIndicatorLinesClass) ParentClass() *gtk.WidgetClass {
valptr := &c.native.parent_class
var _v *gtk.WidgetClass // out
_v = (*gtk.WidgetClass)(gextras.NewStructNative(unsafe.Pointer(valptr)))
return _v
}