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/gdk"
9 "github.com/bnema/puregotk/v4/gobject/types"
10)
11
12// Describes the available system accent colors.
13type AccentColor int
14
15var xAccentColorGLibType func() types.GType
16
17func AccentColorGLibType() types.GType {
18 return xAccentColorGLibType()
19}
20
21const (
22
23 // Use a blue color (`#3584e4`). This is the default value.
24 AccentColorBlueValue AccentColor = 0
25 // Use a teal color (`#2190a4`).
26 AccentColorTealValue AccentColor = 1
27 // Use a green color (`#3a944a`).
28 AccentColorGreenValue AccentColor = 2
29 // Use a yellow color (`#c88800`).
30 AccentColorYellowValue AccentColor = 3
31 // Use a orange color (`#ed5b00`).
32 AccentColorOrangeValue AccentColor = 4
33 // Use a red color (`#e62d42`).
34 AccentColorRedValue AccentColor = 5
35 // Use a pink color (`#d56199`).
36 AccentColorPinkValue AccentColor = 6
37 // Use a purple color (`#9141ac`).
38 AccentColorPurpleValue AccentColor = 7
39 // Use a slate color (`#6f8396`).
40 AccentColorSlateValue AccentColor = 8
41)
42
43var xAccentColorToRgba func(AccentColor, *gdk.RGBA)
44
45// Converts @self to a `GdkRGBA` representing its background color.
46//
47// The matching foreground color is white.
48func AccentColorToRgba(SelfVar AccentColor, RgbaVar *gdk.RGBA) {
49
50 xAccentColorToRgba(SelfVar, RgbaVar)
51
52}
53
54var xAccentColorToStandaloneRgba func(AccentColor, bool, *gdk.RGBA)
55
56// Converts @self to a `GdkRGBA` representing its standalone color.
57//
58// It will typically be darker for light background, and lighter for dark
59// background, ensuring contrast.
60func AccentColorToStandaloneRgba(SelfVar AccentColor, DarkVar bool, RgbaVar *gdk.RGBA) {
61
62 xAccentColorToStandaloneRgba(SelfVar, DarkVar, RgbaVar)
63
64}
65
66var xRgbaToStandalone func(*gdk.RGBA, bool, *gdk.RGBA)
67
68// Adjusts @rgba to be suitable as a standalone color.
69//
70// It will typically be darker for light background, and lighter for dark
71// background, ensuring contrast.
72func RgbaToStandalone(RgbaVar *gdk.RGBA, DarkVar bool, StandaloneRgbaVar *gdk.RGBA) {
73
74 xRgbaToStandalone(RgbaVar, DarkVar, StandaloneRgbaVar)
75
76}
77
78func init() {
79 core.SetPackageName("ADW", "libadwaita-1")
80 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
81 var libs []uintptr
82 for _, libPath := range core.GetPaths("ADW") {
83 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
84 if err != nil {
85 panic(err)
86 }
87 libs = append(libs, lib)
88 }
89
90 core.PuregoSafeRegister(&xAccentColorGLibType, libs, "adw_accent_color_get_type")
91
92 core.PuregoSafeRegister(&xAccentColorToRgba, libs, "adw_accent_color_to_rgba")
93 core.PuregoSafeRegister(&xAccentColorToStandaloneRgba, libs, "adw_accent_color_to_standalone_rgba")
94 core.PuregoSafeRegister(&xRgbaToStandalone, libs, "adw_rgba_to_standalone")
95
96}