// Code generated by cmd/cgo; DO NOT EDIT. //line /home/josie/.cache/paru/clone/wiiudownloader/src/pkg/mod/github.com/gotk3/gotk3@v0.6.5-0.20240618185848-ff349ae13f56/glib/application.go:1:1 package glib // #include // #include // #include // #include "glib.go.h" import _ "unsafe" import "unsafe" // Application is a representation of GApplication. type Application struct { *Object // Interfaces IActionMap IActionGroup } // native() returns a pointer to the underlying GApplication. func (v *Application) native() * /*line :20:33*/_Ctype_GApplication /*line :20:47*/ { if v == nil || v.GObject == nil { return nil } return func() *_Ctype_struct__GApplication{ _cgo0 := /*line :24:26*/unsafe.Pointer(v.GObject); _cgoCheckPointer(_cgo0, nil); return /*line :24:52*/_Cfunc_toGApplication(_cgo0); }() } func (v *Application) Native() uintptr { return uintptr(unsafe.Pointer(v.native())) } func marshalApplication(p uintptr) (interface{}, error) { c := ( /*line :32:7*/_Cfunc_g_value_get_object /*line :32:26*/)((* /*line :32:30*/_Ctype_GValue /*line :32:38*/)(unsafe.Pointer(p))) return wrapApplication(wrapObject(unsafe.Pointer(c))), nil } func wrapApplication(obj *Object) *Application { am := wrapActionMap(obj) ag := wrapActionGroup(obj) return &Application{obj, am, ag} } // ApplicationIDIsValid is a wrapper around g_application_id_is_valid(). func ApplicationIDIsValid(id string) bool { cstr1 := (* /*line :44:13*/_Ctype_gchar /*line :44:20*/)(( /*line :44:22*/_Cfunc_CString /*line :44:30*/)(id)) defer func() func() { _cgo0 := /*line :45:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :45:37*/_Cfunc_free(_cgo0); }}()() return gobool(( /*line :47:16*/_Cfunc_g_application_id_is_valid /*line :47:42*/)(cstr1)) } // ApplicationNew is a wrapper around g_application_new(). func ApplicationNew(appID string, flags ApplicationFlags) *Application { cstr1 := (* /*line :52:13*/_Ctype_gchar /*line :52:20*/)(( /*line :52:22*/_Cfunc_CString /*line :52:30*/)(appID)) defer func() func() { _cgo0 := /*line :53:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :53:37*/_Cfunc_free(_cgo0); }}()() c := ( /*line :55:7*/_Cfunc_g_application_new /*line :55:25*/)(cstr1, /*line :55:34*/_Ctype_GApplicationFlags /*line :55:53*/(flags)) if c == nil { return nil } return wrapApplication(wrapObject(unsafe.Pointer(c))) } // GetApplicationID is a wrapper around g_application_get_application_id(). func (v *Application) GetApplicationID() string { c := func() *_Ctype_gchar{ _cgo0 := /*line :64:42*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :64:53*/_Cfunc_g_application_get_application_id(_cgo0); }() return ( /*line :66:9*/_Cfunc_GoString /*line :66:18*/)((* /*line :66:22*/_Ctype_char /*line :66:28*/)(c)) } // SetApplicationID is a wrapper around g_application_set_application_id(). func (v *Application) SetApplicationID(id string) { cstr1 := (* /*line :71:13*/_Ctype_gchar /*line :71:20*/)(( /*line :71:22*/_Cfunc_CString /*line :71:30*/)(id)) defer func() func() { _cgo0 := /*line :72:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :72:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :74:37*/v.native(); var _cgo1 *_Ctype_gchar = /*line :74:49*/cstr1; _cgoCheckPointer(_cgo0, nil); /*line :74:55*/_Cfunc_g_application_set_application_id(_cgo0, _cgo1); }() } // GetInactivityTimeout is a wrapper around g_application_get_inactivity_timeout(). func (v *Application) GetInactivityTimeout() uint { return uint(func() _Ctype_guint{ _cgo0 := /*line :79:53*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :79:64*/_Cfunc_g_application_get_inactivity_timeout(_cgo0); }()) } // SetInactivityTimeout is a wrapper around g_application_set_inactivity_timeout(). func (v *Application) SetInactivityTimeout(timeout uint) { func() { _cgo0 := /*line :84:41*/v.native(); var _cgo1 _Ctype_guint = _Ctype_guint /*line :84:60*/(timeout); _cgoCheckPointer(_cgo0, nil); /*line :84:70*/_Cfunc_g_application_set_inactivity_timeout(_cgo0, _cgo1); }() } // GetFlags is a wrapper around g_application_get_flags(). func (v *Application) GetFlags() ApplicationFlags { return ApplicationFlags(func() _Ctype_GApplicationFlags{ _cgo0 := /*line :89:52*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :89:63*/_Cfunc_g_application_get_flags(_cgo0); }()) } // SetFlags is a wrapper around g_application_set_flags(). func (v *Application) SetFlags(flags ApplicationFlags) { func() { _cgo0 := /*line :94:28*/v.native(); var _cgo1 _Ctype_GApplicationFlags = _Ctype_GApplicationFlags /*line :94:59*/(flags); _cgoCheckPointer(_cgo0, nil); /*line :94:67*/_Cfunc_g_application_set_flags(_cgo0, _cgo1); }() } // GetDbusObjectPath is a wrapper around g_application_get_dbus_object_path(). func (v *Application) GetDbusObjectPath() string { c := func() *_Ctype_gchar{ _cgo0 := /*line :99:44*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :99:55*/_Cfunc_g_application_get_dbus_object_path(_cgo0); }() return ( /*line :101:9*/_Cfunc_GoString /*line :101:18*/)((* /*line :101:22*/_Ctype_char /*line :101:28*/)(c)) } // GetIsRegistered is a wrapper around g_application_get_is_registered(). func (v *Application) GetIsRegistered() bool { return gobool(func() _Ctype_gboolean{ _cgo0 := /*line :106:50*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :106:61*/_Cfunc_g_application_get_is_registered(_cgo0); }()) } // GetIsRemote is a wrapper around g_application_get_is_remote(). func (v *Application) GetIsRemote() bool { return gobool(func() _Ctype_gboolean{ _cgo0 := /*line :111:46*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :111:57*/_Cfunc_g_application_get_is_remote(_cgo0); }()) } // Hold is a wrapper around g_application_hold(). func (v *Application) Hold() { func() { _cgo0 := /*line :116:23*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :116:34*/_Cfunc_g_application_hold(_cgo0); }() } // Release is a wrapper around g_application_release(). func (v *Application) Release() { func() { _cgo0 := /*line :121:26*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :121:37*/_Cfunc_g_application_release(_cgo0); }() } // Quit is a wrapper around g_application_quit(). func (v *Application) Quit() { func() { _cgo0 := /*line :126:23*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :126:34*/_Cfunc_g_application_quit(_cgo0); }() } // Activate is a wrapper around g_application_activate(). func (v *Application) Activate() { func() { _cgo0 := /*line :131:27*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :131:38*/_Cfunc_g_application_activate(_cgo0); }() } // SendNotification is a wrapper around g_application_send_notification(). func (v *Application) SendNotification(id string, notification *Notification) { cstr1 := (* /*line :136:13*/_Ctype_gchar /*line :136:20*/)(( /*line :136:22*/_Cfunc_CString /*line :136:30*/)(id)) defer func() func() { _cgo0 := /*line :137:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :137:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :139:36*/v.native(); var _cgo1 *_Ctype_gchar = /*line :139:48*/cstr1; _cgo2 := /*line :139:55*/notification.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :139:77*/_Cfunc_g_application_send_notification(_cgo0, _cgo1, _cgo2); }() } // WithdrawNotification is a wrapper around g_application_withdraw_notification(). func (v *Application) WithdrawNotification(id string) { cstr1 := (* /*line :144:13*/_Ctype_gchar /*line :144:20*/)(( /*line :144:22*/_Cfunc_CString /*line :144:30*/)(id)) defer func() func() { _cgo0 := /*line :145:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :145:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :147:40*/v.native(); var _cgo1 *_Ctype_gchar = /*line :147:52*/cstr1; _cgoCheckPointer(_cgo0, nil); /*line :147:58*/_Cfunc_g_application_withdraw_notification(_cgo0, _cgo1); }() } // SetDefault is a wrapper around g_application_set_default(). func (v *Application) SetDefault() { func() { _cgo0 := /*line :152:30*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :152:41*/_Cfunc_g_application_set_default(_cgo0); }() } // ApplicationGetDefault is a wrapper around g_application_get_default(). func ApplicationGetDefault() *Application { c := ( /*line :157:7*/_Cfunc_g_application_get_default /*line :157:33*/)() if c == nil { return nil } return wrapApplication(wrapObject(unsafe.Pointer(c))) } // MarkBusy is a wrapper around g_application_mark_busy(). func (v *Application) MarkBusy() { func() { _cgo0 := /*line :166:28*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :166:39*/_Cfunc_g_application_mark_busy(_cgo0); }() } // UnmarkBusy is a wrapper around g_application_unmark_busy(). func (v *Application) UnmarkBusy() { func() { _cgo0 := /*line :171:30*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :171:41*/_Cfunc_g_application_unmark_busy(_cgo0); }() } // Run is a wrapper around g_application_run(). func (v *Application) Run(args []string) int { cargs := ( /*line :176:11*/_Cfunc_make_strings /*line :176:24*/)( /*line :176:26*/_Ctype_int /*line :176:31*/(len(args))) defer func() func() { _cgo0 := /*line :177:26*/cargs; return func() { _cgoCheckPointer(_cgo0, nil); /*line :177:32*/_Cfunc_destroy_strings(_cgo0); }}()() for i, arg := range args { cstr := ( /*line :180:11*/_Cfunc_CString /*line :180:19*/)(arg) defer func() func() { _cgo0 := /*line :181:16*/unsafe.Pointer(cstr); return func() { _cgoCheckPointer(_cgo0, nil); /*line :181:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :182:16*/cargs; var _cgo1 _Ctype_int = _Ctype_int /*line :182:28*/(i); var _cgo2 *_Ctype_char = /*line :182:33*/(*_Ctype_char /*line :182:41*/)(cstr); _cgoCheckPointer(_cgo0, nil); /*line :182:49*/_Cfunc_set_string(_cgo0, _cgo1, _cgo2); }() } return int(func() _Ctype_int{ _cgo0 := /*line :185:33*/v.native(); var _cgo1 _Ctype_int = _Ctype_int /*line :185:50*/(len(args)); _cgo2 := /*line :185:63*/cargs; _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); return /*line :185:69*/_Cfunc_g_application_run(_cgo0, _cgo1, _cgo2); }()) } // void g_application_bind_busy_property () // void g_application_unbind_busy_property () // gboolean g_application_register () // requires GCancellable // void g_application_set_action_group () // Deprecated since 2.32 // GDBusConnection * g_application_get_dbus_connection () // No support for GDBusConnection // void g_application_open () // Needs GFile // void g_application_add_main_option_entries () //Needs GOptionEntry // void g_application_add_main_option () //Needs GOptionFlags and GOptionArg // void g_application_add_option_group () // Needs GOptionGroup