// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gio import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject/types" ) // `GSimplePermission` is a trivial implementation of [class@Gio.Permission] // that represents a permission that is either always or never allowed. The // value is given at construction and doesn’t change. // // Calling [method@Gio.Permission.acquire] or [method@Gio.Permission.release] // on a `GSimplePermission` will result in errors. type SimplePermission struct { Permission } var xSimplePermissionGLibType func() types.GType func SimplePermissionGLibType() types.GType { return xSimplePermissionGLibType() } func SimplePermissionNewFromInternalPtr(ptr uintptr) *SimplePermission { cls := &SimplePermission{} cls.Ptr = ptr return cls } var xNewSimplePermission func(bool) uintptr // Creates a new #GPermission instance that represents an action that is // either always or never allowed. func NewSimplePermission(AllowedVar bool) *SimplePermission { var cls *SimplePermission cret := xNewSimplePermission(AllowedVar) if cret == 0 { return nil } cls = &SimplePermission{} cls.Ptr = cret return cls } func (c *SimplePermission) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *SimplePermission) SetGoPointer(ptr uintptr) { c.Ptr = ptr } func init() { core.SetPackageName("GIO", "gio-2.0") core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GIO") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xSimplePermissionGLibType, libs, "g_simple_permission_get_type") core.PuregoSafeRegister(&xNewSimplePermission, libs, "g_simple_permission_new") }