1// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package adw
3
4import (
5 "github.com/ebitengine/purego"
6
7 "github.com/bnema/puregotk/pkg/core"
8 "github.com/bnema/puregotk/v4/gobject/types"
9)
10
11// Describes the available easing functions for use with
12// [class@TimedAnimation].
13//
14// New values may be added to this enumeration over time.
15type Easing int
16
17var xEasingGLibType func() types.GType
18
19func EasingGLibType() types.GType {
20 return xEasingGLibType()
21}
22
23const (
24
25 // Linear tweening.
26 LinearValue Easing = 0
27 // Quadratic tweening.
28 EaseInQuadValue Easing = 1
29 // Quadratic tweening, inverse of `ADW_EASE_IN_QUAD`.
30 EaseOutQuadValue Easing = 2
31 // Quadratic tweening, combining `ADW_EASE_IN_QUAD` and
32 // `ADW_EASE_OUT_QUAD`.
33 EaseInOutQuadValue Easing = 3
34 // Cubic tweening.
35 EaseInCubicValue Easing = 4
36 // Cubic tweening, inverse of `ADW_EASE_IN_CUBIC`.
37 EaseOutCubicValue Easing = 5
38 // Cubic tweening, combining `ADW_EASE_IN_CUBIC` and
39 // `ADW_EASE_OUT_CUBIC`.
40 EaseInOutCubicValue Easing = 6
41 // Quartic tweening.
42 EaseInQuartValue Easing = 7
43 // Quartic tweening, inverse of `ADW_EASE_IN_QUART`.
44 EaseOutQuartValue Easing = 8
45 // Quartic tweening, combining `ADW_EASE_IN_QUART` and
46 // `ADW_EASE_OUT_QUART`.
47 EaseInOutQuartValue Easing = 9
48 // Quintic tweening.
49 EaseInQuintValue Easing = 10
50 // Quintic tweening, inverse of `ADW_EASE_IN_QUINT`.
51 EaseOutQuintValue Easing = 11
52 // Quintic tweening, combining `ADW_EASE_IN_QUINT` and
53 // `ADW_EASE_OUT_QUINT`.
54 EaseInOutQuintValue Easing = 12
55 // Sine wave tweening.
56 EaseInSineValue Easing = 13
57 // Sine wave tweening, inverse of `ADW_EASE_IN_SINE`.
58 EaseOutSineValue Easing = 14
59 // Sine wave tweening, combining `ADW_EASE_IN_SINE` and
60 // `ADW_EASE_OUT_SINE`.
61 EaseInOutSineValue Easing = 15
62 // Exponential tweening.
63 EaseInExpoValue Easing = 16
64 // Exponential tweening, inverse of `ADW_EASE_IN_EXPO`.
65 EaseOutExpoValue Easing = 17
66 // Exponential tweening, combining `ADW_EASE_IN_EXPO` and
67 // `ADW_EASE_OUT_EXPO`.
68 EaseInOutExpoValue Easing = 18
69 // Circular tweening.
70 EaseInCircValue Easing = 19
71 // Circular tweening, inverse of `ADW_EASE_IN_CIRC`.
72 EaseOutCircValue Easing = 20
73 // Circular tweening, combining `ADW_EASE_IN_CIRC` and
74 // `ADW_EASE_OUT_CIRC`.
75 EaseInOutCircValue Easing = 21
76 // Elastic tweening, with offshoot on start.
77 EaseInElasticValue Easing = 22
78 // Elastic tweening, with offshoot on end, inverse of
79 // `ADW_EASE_IN_ELASTIC`.
80 EaseOutElasticValue Easing = 23
81 // Elastic tweening, with offshoot on both ends,
82 // combining `ADW_EASE_IN_ELASTIC` and `ADW_EASE_OUT_ELASTIC`.
83 EaseInOutElasticValue Easing = 24
84 // Overshooting cubic tweening, with backtracking on start.
85 EaseInBackValue Easing = 25
86 // Overshooting cubic tweening, with backtracking on end,
87 // inverse of `ADW_EASE_IN_BACK`.
88 EaseOutBackValue Easing = 26
89 // Overshooting cubic tweening, with backtracking on both
90 // ends, combining `ADW_EASE_IN_BACK` and `ADW_EASE_OUT_BACK`.
91 EaseInOutBackValue Easing = 27
92 // Exponentially decaying parabolic (bounce) tweening,
93 // on start.
94 EaseInBounceValue Easing = 28
95 // Exponentially decaying parabolic (bounce) tweening,
96 // with bounce on end, inverse of `ADW_EASE_IN_BOUNCE`.
97 EaseOutBounceValue Easing = 29
98 // Exponentially decaying parabolic (bounce) tweening,
99 // with bounce on both ends, combining `ADW_EASE_IN_BOUNCE` and
100 // `ADW_EASE_OUT_BOUNCE`.
101 EaseInOutBounceValue Easing = 30
102 // Cubic bezier tweening, with control points in (0.25, 0.1) and (0.25, 1.0).
103 //
104 // Increases in velocity towards the middle of the animation, slowing back down
105 // at the end.
106 EaseValue Easing = 31
107 // Cubic bezier tweening, with control points in (0.42, 0.0) and (1.0, 1.0).
108 //
109 // Starts off slowly, with the speed of the animation increasing until complete.
110 EaseInValue Easing = 32
111 // Cubic bezier tweening, with control points in (0.0, 0.0) and (0.58, 1.0).
112 //
113 // Starts quickly, slowing down the animation until complete.
114 EaseOutValue Easing = 33
115 // Cubic bezier tweening, with control points in (0.42, 0.0) and (0.58, 1.0).
116 //
117 // Starts off slowly, speeds up in the middle, and then slows down again.
118 EaseInOutValue Easing = 34
119)
120
121var xEasingEase func(Easing, float64) float64
122
123// Computes easing with @easing for @value.
124//
125// @value should generally be in the [0, 1] range.
126func EasingEase(SelfVar Easing, ValueVar float64) float64 {
127
128 cret := xEasingEase(SelfVar, ValueVar)
129 return cret
130}
131
132func init() {
133 core.SetPackageName("ADW", "libadwaita-1")
134 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
135 var libs []uintptr
136 for _, libPath := range core.GetPaths("ADW") {
137 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
138 if err != nil {
139 panic(err)
140 }
141 libs = append(libs, lib)
142 }
143
144 core.PuregoSafeRegister(&xEasingGLibType, libs, "adw_easing_get_type")
145
146 core.PuregoSafeRegister(&xEasingEase, libs, "adw_easing_ease")
147
148}