// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject/types" ) type OrientableIface struct { _ structs.HostLayout BaseIface uintptr } func (x *OrientableIface) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // An interface for widgets that can be oriented horizontally or vertically. // // `GtkOrientable` is more flexible in that it allows the orientation to be // changed at runtime, allowing the widgets to “flip”. // // ## CSS nodes // // `GtkWidget` types implementing the `GtkOrientable` interface will // automatically acquire the `horizontal` or `vertical` CSS class depending on // the value of the [property@Gtk.Orientable:orientation] property. type Orientable interface { GoPointer() uintptr SetGoPointer(uintptr) GetOrientation() Orientation SetOrientation(OrientationVar Orientation) } var xOrientableGLibType func() types.GType func OrientableGLibType() types.GType { return xOrientableGLibType() } type OrientableBase struct { Ptr uintptr } func (x *OrientableBase) GoPointer() uintptr { if x == nil { return 0 } return x.Ptr } func (x *OrientableBase) SetGoPointer(ptr uintptr) { x.Ptr = ptr } // Retrieves the orientation of the @orientable. func (x *OrientableBase) GetOrientation() Orientation { cret := XGtkOrientableGetOrientation(x.GoPointer()) return cret } // Sets the orientation of the @orientable. func (x *OrientableBase) SetOrientation(OrientationVar Orientation) { XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar) } var XGtkOrientableGetOrientation func(uintptr) Orientation var XGtkOrientableSetOrientation func(uintptr, Orientation) func init() { core.SetPackageName("GTK", "gtk4") core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GTK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xOrientableGLibType, libs, "gtk_orientable_get_type") core.PuregoSafeRegister(&XGtkOrientableGetOrientation, libs, "gtk_orientable_get_orientation") core.PuregoSafeRegister(&XGtkOrientableSetOrientation, libs, "gtk_orientable_set_orientation") }