v0.2.2 9100209

graphene-vec4.go RawHistoryFolder

1// Package graphene was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package graphene
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gobject/types"
12)
13
14// A structure capable of holding a vector with four dimensions: x, y, z, and w.
15//
16// The contents of the #graphene_vec4_t structure are private and should
17// never be accessed directly.
18type Vec4 struct {
19	_ structs.HostLayout
20
21	Value uintptr
22}
23
24var xVec4GLibType func() types.GType
25
26func Vec4GLibType() types.GType {
27	return xVec4GLibType()
28}
29
30func (x *Vec4) GoPointer() uintptr {
31	return uintptr(unsafe.Pointer(x))
32}
33
34var xVec4Alloc func() *Vec4
35
36// Allocates a new #graphene_vec4_t structure.
37//
38// The contents of the returned structure are undefined.
39//
40// Use graphene_vec4_init() to initialize the vector.
41func Vec4Alloc() *Vec4 {
42
43	cret := xVec4Alloc()
44	return cret
45}
46
47var xVec4Add func(uintptr, *Vec4, *Vec4)
48
49// Adds each component of the two given vectors.
50func (x *Vec4) Add(BVar *Vec4, ResVar *Vec4) {
51
52	xVec4Add(x.GoPointer(), BVar, ResVar)
53
54}
55
56var xVec4Divide func(uintptr, *Vec4, *Vec4)
57
58// Divides each component of the first operand @a by the corresponding
59// component of the second operand @b, and places the results into the
60// vector @res.
61func (x *Vec4) Divide(BVar *Vec4, ResVar *Vec4) {
62
63	xVec4Divide(x.GoPointer(), BVar, ResVar)
64
65}
66
67var xVec4Dot func(uintptr, *Vec4) float32
68
69// Computes the dot product of the two given vectors.
70func (x *Vec4) Dot(BVar *Vec4) float32 {
71
72	cret := xVec4Dot(x.GoPointer(), BVar)
73	return cret
74}
75
76var xVec4Equal func(uintptr, *Vec4) bool
77
78// Checks whether the two given #graphene_vec4_t are equal.
79func (x *Vec4) Equal(V2Var *Vec4) bool {
80
81	cret := xVec4Equal(x.GoPointer(), V2Var)
82	return cret
83}
84
85var xVec4Free func(uintptr)
86
87// Frees the resources allocated by @v
88func (x *Vec4) Free() {
89
90	xVec4Free(x.GoPointer())
91
92}
93
94var xVec4GetW func(uintptr) float32
95
96// Retrieves the value of the fourth component of the given #graphene_vec4_t.
97func (x *Vec4) GetW() float32 {
98
99	cret := xVec4GetW(x.GoPointer())
100	return cret
101}
102
103var xVec4GetX func(uintptr) float32
104
105// Retrieves the value of the first component of the given #graphene_vec4_t.
106func (x *Vec4) GetX() float32 {
107
108	cret := xVec4GetX(x.GoPointer())
109	return cret
110}
111
112var xVec4GetXy func(uintptr, *Vec2)
113
114// Creates a #graphene_vec2_t that contains the first two components
115// of the given #graphene_vec4_t.
116func (x *Vec4) GetXy(ResVar *Vec2) {
117
118	xVec4GetXy(x.GoPointer(), ResVar)
119
120}
121
122var xVec4GetXyz func(uintptr, *Vec3)
123
124// Creates a #graphene_vec3_t that contains the first three components
125// of the given #graphene_vec4_t.
126func (x *Vec4) GetXyz(ResVar *Vec3) {
127
128	xVec4GetXyz(x.GoPointer(), ResVar)
129
130}
131
132var xVec4GetY func(uintptr) float32
133
134// Retrieves the value of the second component of the given #graphene_vec4_t.
135func (x *Vec4) GetY() float32 {
136
137	cret := xVec4GetY(x.GoPointer())
138	return cret
139}
140
141var xVec4GetZ func(uintptr) float32
142
143// Retrieves the value of the third component of the given #graphene_vec4_t.
144func (x *Vec4) GetZ() float32 {
145
146	cret := xVec4GetZ(x.GoPointer())
147	return cret
148}
149
150var xVec4Init func(uintptr, float32, float32, float32, float32) *Vec4
151
152// Initializes a #graphene_vec4_t using the given values.
153//
154// This function can be called multiple times.
155func (x *Vec4) Init(XVar float32, YVar float32, ZVar float32, WVar float32) *Vec4 {
156
157	cret := xVec4Init(x.GoPointer(), XVar, YVar, ZVar, WVar)
158	return cret
159}
160
161var xVec4InitFromFloat func(uintptr, *[4]float32) *Vec4
162
163// Initializes a #graphene_vec4_t with the values inside the given array.
164func (x *Vec4) InitFromFloat(SrcVar [4]float32) *Vec4 {
165
166	cret := xVec4InitFromFloat(x.GoPointer(), &SrcVar)
167	return cret
168}
169
170var xVec4InitFromVec2 func(uintptr, *Vec2, float32, float32) *Vec4
171
172// Initializes a #graphene_vec4_t using the components of a
173// #graphene_vec2_t and the values of @z and @w.
174func (x *Vec4) InitFromVec2(SrcVar *Vec2, ZVar float32, WVar float32) *Vec4 {
175
176	cret := xVec4InitFromVec2(x.GoPointer(), SrcVar, ZVar, WVar)
177	return cret
178}
179
180var xVec4InitFromVec3 func(uintptr, *Vec3, float32) *Vec4
181
182// Initializes a #graphene_vec4_t using the components of a
183// #graphene_vec3_t and the value of @w.
184func (x *Vec4) InitFromVec3(SrcVar *Vec3, WVar float32) *Vec4 {
185
186	cret := xVec4InitFromVec3(x.GoPointer(), SrcVar, WVar)
187	return cret
188}
189
190var xVec4InitFromVec4 func(uintptr, *Vec4) *Vec4
191
192// Initializes a #graphene_vec4_t using the components of
193// another #graphene_vec4_t.
194func (x *Vec4) InitFromVec4(SrcVar *Vec4) *Vec4 {
195
196	cret := xVec4InitFromVec4(x.GoPointer(), SrcVar)
197	return cret
198}
199
200var xVec4Interpolate func(uintptr, *Vec4, float64, *Vec4)
201
202// Linearly interpolates @v1 and @v2 using the given @factor.
203func (x *Vec4) Interpolate(V2Var *Vec4, FactorVar float64, ResVar *Vec4) {
204
205	xVec4Interpolate(x.GoPointer(), V2Var, FactorVar, ResVar)
206
207}
208
209var xVec4Length func(uintptr) float32
210
211// Computes the length of the given #graphene_vec4_t.
212func (x *Vec4) Length() float32 {
213
214	cret := xVec4Length(x.GoPointer())
215	return cret
216}
217
218var xVec4Max func(uintptr, *Vec4, *Vec4)
219
220// Compares each component of the two given vectors and creates a
221// vector that contains the maximum values.
222func (x *Vec4) Max(BVar *Vec4, ResVar *Vec4) {
223
224	xVec4Max(x.GoPointer(), BVar, ResVar)
225
226}
227
228var xVec4Min func(uintptr, *Vec4, *Vec4)
229
230// Compares each component of the two given vectors and creates a
231// vector that contains the minimum values.
232func (x *Vec4) Min(BVar *Vec4, ResVar *Vec4) {
233
234	xVec4Min(x.GoPointer(), BVar, ResVar)
235
236}
237
238var xVec4Multiply func(uintptr, *Vec4, *Vec4)
239
240// Multiplies each component of the two given vectors.
241func (x *Vec4) Multiply(BVar *Vec4, ResVar *Vec4) {
242
243	xVec4Multiply(x.GoPointer(), BVar, ResVar)
244
245}
246
247var xVec4Near func(uintptr, *Vec4, float32) bool
248
249// Compares the two given #graphene_vec4_t vectors and checks
250// whether their values are within the given @epsilon.
251func (x *Vec4) Near(V2Var *Vec4, EpsilonVar float32) bool {
252
253	cret := xVec4Near(x.GoPointer(), V2Var, EpsilonVar)
254	return cret
255}
256
257var xVec4Negate func(uintptr, *Vec4)
258
259// Negates the given #graphene_vec4_t.
260func (x *Vec4) Negate(ResVar *Vec4) {
261
262	xVec4Negate(x.GoPointer(), ResVar)
263
264}
265
266var xVec4Normalize func(uintptr, *Vec4)
267
268// Normalizes the given #graphene_vec4_t.
269func (x *Vec4) Normalize(ResVar *Vec4) {
270
271	xVec4Normalize(x.GoPointer(), ResVar)
272
273}
274
275var xVec4Scale func(uintptr, float32, *Vec4)
276
277// Multiplies all components of the given vector with the given scalar @factor.
278func (x *Vec4) Scale(FactorVar float32, ResVar *Vec4) {
279
280	xVec4Scale(x.GoPointer(), FactorVar, ResVar)
281
282}
283
284var xVec4Subtract func(uintptr, *Vec4, *Vec4)
285
286// Subtracts from each component of the first operand @a the
287// corresponding component of the second operand @b and places
288// each result into the components of @res.
289func (x *Vec4) Subtract(BVar *Vec4, ResVar *Vec4) {
290
291	xVec4Subtract(x.GoPointer(), BVar, ResVar)
292
293}
294
295var xVec4ToFloat func(uintptr, *[4]float32)
296
297// Stores the components of the given #graphene_vec4_t into an array
298// of floating point values.
299func (x *Vec4) ToFloat(DestVar *[4]float32) {
300
301	xVec4ToFloat(x.GoPointer(), DestVar)
302
303}
304
305var xVec4One func() *Vec4
306
307// Retrieves a pointer to a #graphene_vec4_t with all its
308// components set to 1.
309func Vec4One() *Vec4 {
310
311	cret := xVec4One()
312	return cret
313}
314
315var xVec4WAxis func() *Vec4
316
317// Retrieves a pointer to a #graphene_vec4_t with its
318// components set to (0, 0, 0, 1).
319func Vec4WAxis() *Vec4 {
320
321	cret := xVec4WAxis()
322	return cret
323}
324
325var xVec4XAxis func() *Vec4
326
327// Retrieves a pointer to a #graphene_vec4_t with its
328// components set to (1, 0, 0, 0).
329func Vec4XAxis() *Vec4 {
330
331	cret := xVec4XAxis()
332	return cret
333}
334
335var xVec4YAxis func() *Vec4
336
337// Retrieves a pointer to a #graphene_vec4_t with its
338// components set to (0, 1, 0, 0).
339func Vec4YAxis() *Vec4 {
340
341	cret := xVec4YAxis()
342	return cret
343}
344
345var xVec4ZAxis func() *Vec4
346
347// Retrieves a pointer to a #graphene_vec4_t with its
348// components set to (0, 0, 1, 0).
349func Vec4ZAxis() *Vec4 {
350
351	cret := xVec4ZAxis()
352	return cret
353}
354
355var xVec4Zero func() *Vec4
356
357// Retrieves a pointer to a #graphene_vec4_t with all its
358// components set to 0.
359func Vec4Zero() *Vec4 {
360
361	cret := xVec4Zero()
362	return cret
363}
364
365func init() {
366	core.SetPackageName("GRAPHENE", "graphene-gobject-1.0")
367	core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"})
368	var libs []uintptr
369	for _, libPath := range core.GetPaths("GRAPHENE") {
370		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
371		if err != nil {
372			panic(err)
373		}
374		libs = append(libs, lib)
375	}
376
377	core.PuregoSafeRegister(&xVec4One, libs, "graphene_vec4_one")
378	core.PuregoSafeRegister(&xVec4WAxis, libs, "graphene_vec4_w_axis")
379	core.PuregoSafeRegister(&xVec4XAxis, libs, "graphene_vec4_x_axis")
380	core.PuregoSafeRegister(&xVec4YAxis, libs, "graphene_vec4_y_axis")
381	core.PuregoSafeRegister(&xVec4ZAxis, libs, "graphene_vec4_z_axis")
382	core.PuregoSafeRegister(&xVec4Zero, libs, "graphene_vec4_zero")
383
384	core.PuregoSafeRegister(&xVec4GLibType, libs, "graphene_vec4_get_type")
385
386	core.PuregoSafeRegister(&xVec4Alloc, libs, "graphene_vec4_alloc")
387
388	core.PuregoSafeRegister(&xVec4Add, libs, "graphene_vec4_add")
389	core.PuregoSafeRegister(&xVec4Divide, libs, "graphene_vec4_divide")
390	core.PuregoSafeRegister(&xVec4Dot, libs, "graphene_vec4_dot")
391	core.PuregoSafeRegister(&xVec4Equal, libs, "graphene_vec4_equal")
392	core.PuregoSafeRegister(&xVec4Free, libs, "graphene_vec4_free")
393	core.PuregoSafeRegister(&xVec4GetW, libs, "graphene_vec4_get_w")
394	core.PuregoSafeRegister(&xVec4GetX, libs, "graphene_vec4_get_x")
395	core.PuregoSafeRegister(&xVec4GetXy, libs, "graphene_vec4_get_xy")
396	core.PuregoSafeRegister(&xVec4GetXyz, libs, "graphene_vec4_get_xyz")
397	core.PuregoSafeRegister(&xVec4GetY, libs, "graphene_vec4_get_y")
398	core.PuregoSafeRegister(&xVec4GetZ, libs, "graphene_vec4_get_z")
399	core.PuregoSafeRegister(&xVec4Init, libs, "graphene_vec4_init")
400	core.PuregoSafeRegister(&xVec4InitFromFloat, libs, "graphene_vec4_init_from_float")
401	core.PuregoSafeRegister(&xVec4InitFromVec2, libs, "graphene_vec4_init_from_vec2")
402	core.PuregoSafeRegister(&xVec4InitFromVec3, libs, "graphene_vec4_init_from_vec3")
403	core.PuregoSafeRegister(&xVec4InitFromVec4, libs, "graphene_vec4_init_from_vec4")
404	core.PuregoSafeRegister(&xVec4Interpolate, libs, "graphene_vec4_interpolate")
405	core.PuregoSafeRegister(&xVec4Length, libs, "graphene_vec4_length")
406	core.PuregoSafeRegister(&xVec4Max, libs, "graphene_vec4_max")
407	core.PuregoSafeRegister(&xVec4Min, libs, "graphene_vec4_min")
408	core.PuregoSafeRegister(&xVec4Multiply, libs, "graphene_vec4_multiply")
409	core.PuregoSafeRegister(&xVec4Near, libs, "graphene_vec4_near")
410	core.PuregoSafeRegister(&xVec4Negate, libs, "graphene_vec4_negate")
411	core.PuregoSafeRegister(&xVec4Normalize, libs, "graphene_vec4_normalize")
412	core.PuregoSafeRegister(&xVec4Scale, libs, "graphene_vec4_scale")
413	core.PuregoSafeRegister(&xVec4Subtract, libs, "graphene_vec4_subtract")
414	core.PuregoSafeRegister(&xVec4ToFloat, libs, "graphene_vec4_to_float")
415
416}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close