gtkdebug.go RawHistoryFolder
1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
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// Flags to use with gtk_set_debug_flags().
12//
13// Settings these flags causes GTK to print out different
14// types of debugging information. Some of these flags are
15// only available when GTK has been configured with `-Ddebug=true`.
16type DebugFlags int
17
18var xDebugFlagsGLibType func() types.GType
19
20func DebugFlagsGLibType() types.GType {
21 return xDebugFlagsGLibType()
22}
23
24const (
25
26 // Information about GtkTextView
27 DebugTextValue DebugFlags = 1
28 // Information about GtkTreeView
29 DebugTreeValue DebugFlags = 2
30 // Information about keyboard shortcuts
31 DebugKeybindingsValue DebugFlags = 4
32 // Information about modules and extensions
33 DebugModulesValue DebugFlags = 8
34 // Information about size allocation
35 DebugGeometryValue DebugFlags = 16
36 // Information about icon themes
37 DebugIconthemeValue DebugFlags = 32
38 // Information about printing
39 DebugPrintingValue DebugFlags = 64
40 // Trace GtkBuilder operation
41 DebugBuilderTraceValue DebugFlags = 128
42 // Information about size requests
43 DebugSizeRequestValue DebugFlags = 256
44 // Disable the style property cache
45 DebugNoCssCacheValue DebugFlags = 512
46 // Open the GTK inspector
47 DebugInteractiveValue DebugFlags = 1024
48 // Show touch UI elements for pointer events.
49 DebugTouchscreenValue DebugFlags = 2048
50 // Information about actions and menu models
51 DebugActionsValue DebugFlags = 4096
52 // Information from layout managers
53 DebugLayoutValue DebugFlags = 8192
54 // Include debug render nodes in the generated snapshots
55 DebugSnapshotValue DebugFlags = 16384
56 // Information from the constraints solver
57 DebugConstraintsValue DebugFlags = 32768
58 // Log unused GtkBuilder objects
59 DebugBuilderObjectsValue DebugFlags = 65536
60 // Information about accessibility state changes
61 DebugA11yValue DebugFlags = 131072
62 // Information about icon fallback.
63 DebugIconfallbackValue DebugFlags = 262144
64 // Inverts the default text-direction.
65 DebugInvertTextDirValue DebugFlags = 524288
66 // Information about deprecated CSS features.
67 DebugCssValue DebugFlags = 1048576
68 // Information about deprecated GtkBuilder features.
69 DebugBuilderValue DebugFlags = 2097152
70)
71
72var xGetDebugFlags func() DebugFlags
73
74// Returns the GTK debug flags that are currently active.
75//
76// This function is intended for GTK modules that want
77// to adjust their debug output based on GTK debug flags.
78func GetDebugFlags() DebugFlags {
79
80 cret := xGetDebugFlags()
81 return cret
82}
83
84var xSetDebugFlags func(DebugFlags)
85
86// Sets the GTK debug flags.
87func SetDebugFlags(FlagsVar DebugFlags) {
88
89 xSetDebugFlags(FlagsVar)
90
91}
92
93func init() {
94 core.SetPackageName("GTK", "gtk4")
95 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
96 var libs []uintptr
97 for _, libPath := range core.GetPaths("GTK") {
98 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
99 if err != nil {
100 panic(err)
101 }
102 libs = append(libs, lib)
103 }
104
105 core.PuregoSafeRegister(&xDebugFlagsGLibType, libs, "gtk_debug_flags_get_type")
106
107 core.PuregoSafeRegister(&xGetDebugFlags, libs, "gtk_get_debug_flags")
108 core.PuregoSafeRegister(&xSetDebugFlags, libs, "gtk_set_debug_flags")
109
110}