adw-version.go RawHistoryFolder
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)
9
10const (
11 // Adwaita major version component (e.g. 1 if the version is 1.2.3).
12 MAJOR_VERSION int = 1
13 // Adwaita micro version component (e.g. 3 if the version is 1.2.3).
14 MICRO_VERSION int = 1
15 // Adwaita minor version component (e.g. 2 if the version is 1.2.3).
16 MINOR_VERSION int = 8
17 // Adwaita version, encoded as a string, useful for printing and
18 // concatenation.
19 VERSION_S string = "1.8.1"
20)
21
22var xGetMajorVersion func() uint
23
24// Returns the major version number of the Adwaita library.
25//
26// For example, in libadwaita version 1.2.3 this is 1.
27//
28// This function is in the library, so it represents the libadwaita library your
29// code is running against. Contrast with the [const@MAJOR_VERSION] constant,
30// which represents the major version of the libadwaita headers you have
31// included when compiling your code.
32func GetMajorVersion() uint {
33
34 cret := xGetMajorVersion()
35 return cret
36}
37
38var xGetMicroVersion func() uint
39
40// Returns the micro version number of the Adwaita library.
41//
42// For example, in libadwaita version 1.2.3 this is 3.
43//
44// This function is in the library, so it represents the libadwaita library your
45// code is running against. Contrast with the [const@MAJOR_VERSION] constant,
46// which represents the micro version of the libadwaita headers you have
47// included when compiling your code.
48func GetMicroVersion() uint {
49
50 cret := xGetMicroVersion()
51 return cret
52}
53
54var xGetMinorVersion func() uint
55
56// Returns the minor version number of the Adwaita library.
57//
58// For example, in libadwaita version 1.2.3 this is 2.
59//
60// This function is in the library, so it represents the libadwaita library your
61// code is running against. Contrast with the [const@MAJOR_VERSION] constant,
62// which represents the minor version of the libadwaita headers you have
63// included when compiling your code.
64func GetMinorVersion() uint {
65
66 cret := xGetMinorVersion()
67 return cret
68}
69
70func init() {
71 core.SetPackageName("ADW", "libadwaita-1")
72 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
73 var libs []uintptr
74 for _, libPath := range core.GetPaths("ADW") {
75 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
76 if err != nil {
77 panic(err)
78 }
79 libs = append(libs, lib)
80 }
81
82 core.PuregoSafeRegister(&xGetMajorVersion, libs, "adw_get_major_version")
83 core.PuregoSafeRegister(&xGetMicroVersion, libs, "adw_get_micro_version")
84 core.PuregoSafeRegister(&xGetMinorVersion, libs, "adw_get_minor_version")
85
86}