// 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/menu.go:1:1 package glib // #include // #include // #include // #include "glib.go.h" import _ "unsafe" import "unsafe" // Predefined attribute names for GMenu var ( MENU_ATTRIBUTE_ACTION string = ( /*line :12:43*/_Csconst_G_MENU_ATTRIBUTE_ACTION /*line :12:67*/) MENU_ATTRIBUTE_ACTION_NAMESPACE string = ( /*line :13:43*/_Csconst_G_MENU_ATTRIBUTE_ACTION_NAMESPACE /*line :13:77*/) MENU_ATTRIBUTE_TARGET string = ( /*line :14:43*/_Csconst_G_MENU_ATTRIBUTE_TARGET /*line :14:67*/) MENU_ATTRIBUTE_LABEL string = ( /*line :15:43*/_Csconst_G_MENU_ATTRIBUTE_LABEL /*line :15:66*/) MENU_ATTRIBUTE_ICON string = ( /*line :16:43*/_Csconst_G_MENU_ATTRIBUTE_ICON /*line :16:65*/) ) // Predefined link names for GMenu var ( MENU_LINK_SECTION string = ( /*line :21:29*/_Csconst_G_MENU_LINK_SECTION /*line :21:49*/) MENU_LINK_SUBMENU string = ( /*line :22:29*/_Csconst_G_MENU_LINK_SUBMENU /*line :22:49*/) ) // MenuModel is a representation of GMenuModel. type MenuModel struct { *Object } // native returns a pointer to the underlying GMenuModel. func (v *MenuModel) native() * /*line :31:31*/_Ctype_GMenuModel /*line :31:43*/ { if v == nil || v.GObject == nil { return nil } return func() *_Ctype_struct__GMenuModel{ _cgo0 := /*line :35:24*/unsafe.Pointer(v.GObject); _cgoCheckPointer(_cgo0, nil); return /*line :35:50*/_Cfunc_toGMenuModel(_cgo0); }() } // Native returns a pointer to the underlying GMenuModel. func (v *MenuModel) Native() uintptr { return uintptr(unsafe.Pointer(v.native())) } func marshalMenuModel(p uintptr) (interface{}, error) { c := ( /*line :44:7*/_Cfunc_g_value_get_object /*line :44:26*/)((* /*line :44:30*/_Ctype_GValue /*line :44:38*/)(unsafe.Pointer(p))) return wrapMenuModel(wrapObject(unsafe.Pointer(c))), nil } func wrapMenuModel(obj *Object) *MenuModel { return &MenuModel{obj} } // IsMutable is a wrapper around g_menu_model_is_mutable(). func (v *MenuModel) IsMutable() bool { return gobool(func() _Ctype_gboolean{ _cgo0 := /*line :54:42*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :54:53*/_Cfunc_g_menu_model_is_mutable(_cgo0); }()) } // GetNItems is a wrapper around g_menu_model_get_n_items(). func (v *MenuModel) GetNItems() int { return int(func() _Ctype_gint{ _cgo0 := /*line :59:40*/v.native(); _cgoCheckPointer(_cgo0, nil); return /*line :59:51*/_Cfunc_g_menu_model_get_n_items(_cgo0); }()) } // GetItemLink is a wrapper around g_menu_model_get_item_link(). func (v *MenuModel) GetItemLink(index int, link string) *MenuModel { cstr := (* /*line :64:12*/_Ctype_gchar /*line :64:19*/)(( /*line :64:21*/_Cfunc_CString /*line :64:29*/)(link)) defer func() func() { _cgo0 := /*line :65:15*/unsafe.Pointer(cstr); return func() { _cgoCheckPointer(_cgo0, nil); /*line :65:36*/_Cfunc_free(_cgo0); }}()() c := func() *_Ctype_struct__GMenuModel{ _cgo0 := /*line :66:36*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :66:54*/(index); var _cgo2 *_Ctype_gchar = /*line :66:63*/cstr; _cgoCheckPointer(_cgo0, nil); return /*line :66:68*/_Cfunc_g_menu_model_get_item_link(_cgo0, _cgo1, _cgo2); }() if c == nil { return nil } return wrapMenuModel(wrapObject(unsafe.Pointer(c))) } // ItemsChanged is a wrapper around g_menu_model_items_changed(). func (v *MenuModel) ItemsChanged(position, removed, added int) { func() { _cgo0 := /*line :75:31*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :75:49*/(position); var _cgo2 _Ctype_gint = _Ctype_gint /*line :75:67*/(removed); var _cgo3 _Ctype_gint = _Ctype_gint /*line :75:84*/(added); _cgoCheckPointer(_cgo0, nil); /*line :75:92*/_Cfunc_g_menu_model_items_changed(_cgo0, _cgo1, _cgo2, _cgo3); }() } // GVariant * g_menu_model_get_item_attribute_value () // gboolean g_menu_model_get_item_attribute () // GMenuAttributeIter * g_menu_model_iterate_item_attributes () // GMenuLinkIter * g_menu_model_iterate_item_links () // Menu is a representation of GMenu. type Menu struct { MenuModel } // native() returns a pointer to the underlying GMenu. func (v *Menu) native() * /*line :89:26*/_Ctype_GMenu /*line :89:33*/ { if v == nil || v.GObject == nil { return nil } p := unsafe.Pointer(v.GObject) return func() *_Ctype_struct__GMenu{ _cgo0 := /*line :94:19*/p; _cgoCheckPointer(_cgo0, nil); return /*line :94:21*/_Cfunc_toGMenu(_cgo0); }() } func marshalMenu(p uintptr) (interface{}, error) { c := ( /*line :98:7*/_Cfunc_g_value_get_object /*line :98:26*/)((* /*line :98:30*/_Ctype_GValue /*line :98:38*/)(unsafe.Pointer(p))) return wrapMenu(wrapObject(unsafe.Pointer(c))), nil } func wrapMenu(obj *Object) *Menu { return &Menu{MenuModel{obj}} } // MenuNew is a wrapper around g_menu_new(). func MenuNew() *Menu { c := ( /*line :108:7*/_Cfunc_g_menu_new /*line :108:18*/)() if c == nil { return nil } return wrapMenu(wrapObject(unsafe.Pointer(c))) } // Freeze is a wrapper around g_menu_freeze(). func (v *Menu) Freeze() { func() { _cgo0 := /*line :117:18*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :117:29*/_Cfunc_g_menu_freeze(_cgo0); }() } // Insert is a wrapper around g_menu_insert(). func (v *Menu) Insert(position int, label, detailedAction string) { cstr1 := (* /*line :122:13*/_Ctype_gchar /*line :122:20*/)(( /*line :122:22*/_Cfunc_CString /*line :122:30*/)(label)) defer func() func() { _cgo0 := /*line :123:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :123:37*/_Cfunc_free(_cgo0); }}()() cstr2 := (* /*line :125:13*/_Ctype_gchar /*line :125:20*/)(( /*line :125:22*/_Cfunc_CString /*line :125:30*/)(detailedAction)) defer func() func() { _cgo0 := /*line :126:15*/unsafe.Pointer(cstr2); return func() { _cgoCheckPointer(_cgo0, nil); /*line :126:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :128:18*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :128:36*/(position); var _cgo2 *_Ctype_gchar = /*line :128:48*/cstr1; var _cgo3 *_Ctype_gchar = /*line :128:55*/cstr2; _cgoCheckPointer(_cgo0, nil); /*line :128:61*/_Cfunc_g_menu_insert(_cgo0, _cgo1, _cgo2, _cgo3); }() } // Prepend is a wrapper around g_menu_prepend(). func (v *Menu) Prepend(label, detailedAction string) { cstr1 := (* /*line :133:13*/_Ctype_gchar /*line :133:20*/)(( /*line :133:22*/_Cfunc_CString /*line :133:30*/)(label)) defer func() func() { _cgo0 := /*line :134:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :134:37*/_Cfunc_free(_cgo0); }}()() cstr2 := (* /*line :136:13*/_Ctype_gchar /*line :136:20*/)(( /*line :136:22*/_Cfunc_CString /*line :136:30*/)(detailedAction)) defer func() func() { _cgo0 := /*line :137:15*/unsafe.Pointer(cstr2); return func() { _cgoCheckPointer(_cgo0, nil); /*line :137:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :139:19*/v.native(); var _cgo1 *_Ctype_gchar = /*line :139:31*/cstr1; var _cgo2 *_Ctype_gchar = /*line :139:38*/cstr2; _cgoCheckPointer(_cgo0, nil); /*line :139:44*/_Cfunc_g_menu_prepend(_cgo0, _cgo1, _cgo2); }() } // Append is a wrapper around g_menu_append(). func (v *Menu) Append(label, detailedAction string) { cstr1 := (* /*line :144:13*/_Ctype_gchar /*line :144:20*/)(( /*line :144:22*/_Cfunc_CString /*line :144:30*/)(label)) defer func() func() { _cgo0 := /*line :145:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :145:37*/_Cfunc_free(_cgo0); }}()() cstr2 := (* /*line :147:13*/_Ctype_gchar /*line :147:20*/)(( /*line :147:22*/_Cfunc_CString /*line :147:30*/)(detailedAction)) defer func() func() { _cgo0 := /*line :148:15*/unsafe.Pointer(cstr2); return func() { _cgoCheckPointer(_cgo0, nil); /*line :148:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :150:18*/v.native(); var _cgo1 *_Ctype_gchar = /*line :150:30*/cstr1; var _cgo2 *_Ctype_gchar = /*line :150:37*/cstr2; _cgoCheckPointer(_cgo0, nil); /*line :150:43*/_Cfunc_g_menu_append(_cgo0, _cgo1, _cgo2); }() } // InsertItem is a wrapper around g_menu_insert_item(). func (v *Menu) InsertItem(position int, item *MenuItem) { func() { _cgo0 := /*line :155:23*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :155:41*/(position); _cgo2 := /*line :155:53*/item.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :155:67*/_Cfunc_g_menu_insert_item(_cgo0, _cgo1, _cgo2); }() } // AppendItem is a wrapper around g_menu_append_item(). func (v *Menu) AppendItem(item *MenuItem) { func() { _cgo0 := /*line :160:23*/v.native(); _cgo1 := /*line :160:35*/item.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :160:49*/_Cfunc_g_menu_append_item(_cgo0, _cgo1); }() } // PrependItem is a wrapper around g_menu_prepend_item(). func (v *Menu) PrependItem(item *MenuItem) { func() { _cgo0 := /*line :165:24*/v.native(); _cgo1 := /*line :165:36*/item.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :165:50*/_Cfunc_g_menu_prepend_item(_cgo0, _cgo1); }() } // InsertSection is a wrapper around g_menu_insert_section(). func (v *Menu) InsertSection(position int, label string, section *MenuModel) { cstr1 := (* /*line :170:13*/_Ctype_gchar /*line :170:20*/)(( /*line :170:22*/_Cfunc_CString /*line :170:30*/)(label)) defer func() func() { _cgo0 := /*line :171:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :171:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :173:26*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :173:44*/(position); var _cgo2 *_Ctype_gchar = /*line :173:56*/cstr1; _cgo3 := /*line :173:63*/section.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo3, nil); /*line :173:80*/_Cfunc_g_menu_insert_section(_cgo0, _cgo1, _cgo2, _cgo3); }() } // PrependSection is a wrapper around g_menu_prepend_section(). func (v *Menu) PrependSection(label string, section *MenuModel) { cstr1 := (* /*line :178:13*/_Ctype_gchar /*line :178:20*/)(( /*line :178:22*/_Cfunc_CString /*line :178:30*/)(label)) defer func() func() { _cgo0 := /*line :179:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :179:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :181:27*/v.native(); var _cgo1 *_Ctype_gchar = /*line :181:39*/cstr1; _cgo2 := /*line :181:46*/section.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :181:63*/_Cfunc_g_menu_prepend_section(_cgo0, _cgo1, _cgo2); }() } // AppendSection is a wrapper around g_menu_append_section(). func (v *Menu) AppendSection(label string, section *MenuModel) { cstr1 := (* /*line :186:13*/_Ctype_gchar /*line :186:20*/)(( /*line :186:22*/_Cfunc_CString /*line :186:30*/)(label)) defer func() func() { _cgo0 := /*line :187:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :187:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :189:26*/v.native(); var _cgo1 *_Ctype_gchar = /*line :189:38*/cstr1; _cgo2 := /*line :189:45*/section.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :189:62*/_Cfunc_g_menu_append_section(_cgo0, _cgo1, _cgo2); }() } // InsertSectionWithoutLabel is a wrapper around g_menu_insert_section() // with label set to null. func (v *Menu) InsertSectionWithoutLabel(position int, section *MenuModel) { func() { _cgo0 := /*line :195:26*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :195:44*/(position); var _cgo2 *_Ctype_gchar = /*line :195:56*/nil; _cgo3 := /*line :195:61*/section.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo3, nil); /*line :195:78*/_Cfunc_g_menu_insert_section(_cgo0, _cgo1, _cgo2, _cgo3); }() } // PrependSectionWithoutLabel is a wrapper around // g_menu_prepend_section() with label set to null. func (v *Menu) PrependSectionWithoutLabel(section *MenuModel) { func() { _cgo0 := /*line :201:27*/v.native(); var _cgo1 *_Ctype_gchar = /*line :201:39*/nil; _cgo2 := /*line :201:44*/section.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :201:61*/_Cfunc_g_menu_prepend_section(_cgo0, _cgo1, _cgo2); }() } // AppendSectionWithoutLabel is a wrapper around g_menu_append_section() // with label set to null. func (v *Menu) AppendSectionWithoutLabel(section *MenuModel) { func() { _cgo0 := /*line :207:26*/v.native(); var _cgo1 *_Ctype_gchar = /*line :207:38*/nil; _cgo2 := /*line :207:43*/section.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :207:60*/_Cfunc_g_menu_append_section(_cgo0, _cgo1, _cgo2); }() } // InsertSubmenu is a wrapper around g_menu_insert_submenu(). func (v *Menu) InsertSubmenu(position int, label string, submenu *MenuModel) { cstr1 := (* /*line :212:13*/_Ctype_gchar /*line :212:20*/)(( /*line :212:22*/_Cfunc_CString /*line :212:30*/)(label)) defer func() func() { _cgo0 := /*line :213:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :213:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :215:26*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :215:44*/(position); var _cgo2 *_Ctype_gchar = /*line :215:56*/cstr1; _cgo3 := /*line :215:63*/submenu.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo3, nil); /*line :215:80*/_Cfunc_g_menu_insert_submenu(_cgo0, _cgo1, _cgo2, _cgo3); }() } // PrependSubmenu is a wrapper around g_menu_prepend_submenu(). func (v *Menu) PrependSubmenu(label string, submenu *MenuModel) { cstr1 := (* /*line :220:13*/_Ctype_gchar /*line :220:20*/)(( /*line :220:22*/_Cfunc_CString /*line :220:30*/)(label)) defer func() func() { _cgo0 := /*line :221:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :221:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :223:27*/v.native(); var _cgo1 *_Ctype_gchar = /*line :223:39*/cstr1; _cgo2 := /*line :223:46*/submenu.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :223:63*/_Cfunc_g_menu_prepend_submenu(_cgo0, _cgo1, _cgo2); }() } // AppendSubmenu is a wrapper around g_menu_append_submenu(). func (v *Menu) AppendSubmenu(label string, submenu *MenuModel) { cstr1 := (* /*line :228:13*/_Ctype_gchar /*line :228:20*/)(( /*line :228:22*/_Cfunc_CString /*line :228:30*/)(label)) defer func() func() { _cgo0 := /*line :229:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :229:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :231:26*/v.native(); var _cgo1 *_Ctype_gchar = /*line :231:38*/cstr1; _cgo2 := /*line :231:45*/submenu.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :231:62*/_Cfunc_g_menu_append_submenu(_cgo0, _cgo1, _cgo2); }() } // Remove is a wrapper around g_menu_remove(). func (v *Menu) Remove(position int) { func() { _cgo0 := /*line :236:18*/v.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :236:36*/(position); _cgoCheckPointer(_cgo0, nil); /*line :236:47*/_Cfunc_g_menu_remove(_cgo0, _cgo1); }() } // RemoveAll is a wrapper around g_menu_remove_all(). func (v *Menu) RemoveAll() { func() { _cgo0 := /*line :241:22*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :241:33*/_Cfunc_g_menu_remove_all(_cgo0); }() } // MenuItem is a representation of GMenuItem. type MenuItem struct { *Object } // native() returns a pointer to the underlying GMenuItem. func (v *MenuItem) native() * /*line :250:30*/_Ctype_GMenuItem /*line :250:41*/ { if v == nil || v.GObject == nil { return nil } p := unsafe.Pointer(v.GObject) return func() *_Ctype_struct__GMenuItem{ _cgo0 := /*line :255:23*/p; _cgoCheckPointer(_cgo0, nil); return /*line :255:25*/_Cfunc_toGMenuItem(_cgo0); }() } func marshalMenuItem(p uintptr) (interface{}, error) { c := ( /*line :259:7*/_Cfunc_g_value_get_object /*line :259:26*/)((* /*line :259:30*/_Ctype_GValue /*line :259:38*/)(unsafe.Pointer(p))) return wrapMenuItem(wrapObject(unsafe.Pointer(c))), nil } func wrapMenuItem(obj *Object) *MenuItem { return &MenuItem{obj} } // MenuItemNew is a wrapper around g_menu_item_new(NULL, NULL). func MenuItemNew() *MenuItem { c := ( /*line :269:7*/_Cfunc_g_menu_item_new /*line :269:23*/)(nil, nil) if c == nil { return nil } return wrapMenuItem(wrapObject(unsafe.Pointer(c))) } // MenuItemNewWithLabel is a wrapper around g_menu_item_new(label, NULL). func MenuItemNewWithLabel(label string) *MenuItem { cstr1 := (* /*line :278:13*/_Ctype_gchar /*line :278:20*/)(( /*line :278:22*/_Cfunc_CString /*line :278:30*/)(label)) defer func() func() { _cgo0 := /*line :279:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :279:37*/_Cfunc_free(_cgo0); }}()() c := ( /*line :281:7*/_Cfunc_g_menu_item_new /*line :281:23*/)(cstr1, nil) if c == nil { return nil } return wrapMenuItem(wrapObject(unsafe.Pointer(c))) } // MenuItemNewWithAction is a wrapper around g_menu_item_new(NULL, detailedAction). func MenuItemNewWithAction(detailedAction string) *MenuItem { cstr1 := (* /*line :290:13*/_Ctype_gchar /*line :290:20*/)(( /*line :290:22*/_Cfunc_CString /*line :290:30*/)(detailedAction)) defer func() func() { _cgo0 := /*line :291:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :291:37*/_Cfunc_free(_cgo0); }}()() c := ( /*line :293:7*/_Cfunc_g_menu_item_new /*line :293:23*/)(nil, cstr1) if c == nil { return nil } return wrapMenuItem(wrapObject(unsafe.Pointer(c))) } // MenuItemNewWithLabelAndAction is a wrapper around g_menu_item_new(label, detailedAction). func MenuItemNewWithLabelAndAction(label, detailedAction string) *MenuItem { cstr1 := (* /*line :302:13*/_Ctype_gchar /*line :302:20*/)(( /*line :302:22*/_Cfunc_CString /*line :302:30*/)(label)) defer func() func() { _cgo0 := /*line :303:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :303:37*/_Cfunc_free(_cgo0); }}()() cstr2 := (* /*line :305:13*/_Ctype_gchar /*line :305:20*/)(( /*line :305:22*/_Cfunc_CString /*line :305:30*/)(detailedAction)) defer func() func() { _cgo0 := /*line :306:15*/unsafe.Pointer(cstr2); return func() { _cgoCheckPointer(_cgo0, nil); /*line :306:37*/_Cfunc_free(_cgo0); }}()() c := ( /*line :308:7*/_Cfunc_g_menu_item_new /*line :308:23*/)(cstr1, cstr2) if c == nil { return nil } return wrapMenuItem(wrapObject(unsafe.Pointer(c))) } // MenuItemNewSection is a wrapper around g_menu_item_new_section(). func MenuItemNewSection(label string, section *MenuModel) *MenuItem { cstr1 := (* /*line :317:13*/_Ctype_gchar /*line :317:20*/)(( /*line :317:22*/_Cfunc_CString /*line :317:30*/)(label)) defer func() func() { _cgo0 := /*line :318:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :318:37*/_Cfunc_free(_cgo0); }}()() c := func() *_Ctype_struct__GMenuItem{ var _cgo0 *_Ctype_gchar = /*line :320:33*/cstr1; _cgo1 := /*line :320:40*/section.native(); _cgoCheckPointer(_cgo1, nil); return /*line :320:57*/_Cfunc_g_menu_item_new_section(_cgo0, _cgo1); }() if c == nil { return nil } return wrapMenuItem(wrapObject(unsafe.Pointer(c))) } // MenuItemNewSubmenu is a wrapper around g_menu_item_new_submenu(). func MenuItemNewSubmenu(label string, submenu *MenuModel) *MenuItem { cstr1 := (* /*line :329:13*/_Ctype_gchar /*line :329:20*/)(( /*line :329:22*/_Cfunc_CString /*line :329:30*/)(label)) defer func() func() { _cgo0 := /*line :330:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :330:37*/_Cfunc_free(_cgo0); }}()() c := func() *_Ctype_struct__GMenuItem{ var _cgo0 *_Ctype_gchar = /*line :332:33*/cstr1; _cgo1 := /*line :332:40*/submenu.native(); _cgoCheckPointer(_cgo1, nil); return /*line :332:57*/_Cfunc_g_menu_item_new_submenu(_cgo0, _cgo1); }() if c == nil { return nil } return wrapMenuItem(wrapObject(unsafe.Pointer(c))) } // MenuItemNewFromModel is a wrapper around g_menu_item_new_from_model(). func MenuItemNewFromModel(model *MenuModel, index int) *MenuItem { c := func() *_Ctype_struct__GMenuItem{ _cgo0 := /*line :341:36*/model.native(); var _cgo1 _Ctype_gint = _Ctype_gint /*line :341:58*/(index); _cgoCheckPointer(_cgo0, nil); return /*line :341:66*/_Cfunc_g_menu_item_new_from_model(_cgo0, _cgo1); }() if c == nil { return nil } return wrapMenuItem(wrapObject(unsafe.Pointer(c))) } // SetLabel is a wrapper around g_menu_item_set_label(). func (v *MenuItem) SetLabel(label string) { cstr1 := (* /*line :350:13*/_Ctype_gchar /*line :350:20*/)(( /*line :350:22*/_Cfunc_CString /*line :350:30*/)(label)) defer func() func() { _cgo0 := /*line :351:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :351:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :353:26*/v.native(); var _cgo1 *_Ctype_gchar = /*line :353:38*/cstr1; _cgoCheckPointer(_cgo0, nil); /*line :353:44*/_Cfunc_g_menu_item_set_label(_cgo0, _cgo1); }() } // UnsetLabel is a wrapper around g_menu_item_set_label(NULL). func (v *MenuItem) UnsetLabel() { func() { _cgo0 := /*line :358:26*/v.native(); var _cgo1 *_Ctype_gchar = /*line :358:38*/nil; _cgoCheckPointer(_cgo0, nil); /*line :358:42*/_Cfunc_g_menu_item_set_label(_cgo0, _cgo1); }() } // SetDetailedAction is a wrapper around g_menu_item_set_detailed_action(). func (v *MenuItem) SetDetailedAction(act string) { cstr1 := (* /*line :363:13*/_Ctype_gchar /*line :363:20*/)(( /*line :363:22*/_Cfunc_CString /*line :363:30*/)(act)) defer func() func() { _cgo0 := /*line :364:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :364:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :366:36*/v.native(); var _cgo1 *_Ctype_gchar = /*line :366:48*/cstr1; _cgoCheckPointer(_cgo0, nil); /*line :366:54*/_Cfunc_g_menu_item_set_detailed_action(_cgo0, _cgo1); }() } // SetSection is a wrapper around g_menu_item_set_section(). func (v *MenuItem) SetSection(section *MenuModel) { func() { _cgo0 := /*line :371:28*/v.native(); _cgo1 := /*line :371:40*/section.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :371:57*/_Cfunc_g_menu_item_set_section(_cgo0, _cgo1); }() } // SetSubmenu is a wrapper around g_menu_item_set_submenu(). func (v *MenuItem) SetSubmenu(submenu *MenuModel) { func() { _cgo0 := /*line :376:28*/v.native(); _cgo1 := /*line :376:40*/submenu.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo1, nil); /*line :376:57*/_Cfunc_g_menu_item_set_submenu(_cgo0, _cgo1); }() } // GetLink is a wrapper around g_menu_item_get_link(). func (v *MenuItem) GetLink(link string) *MenuModel { cstr1 := (* /*line :381:13*/_Ctype_gchar /*line :381:20*/)(( /*line :381:22*/_Cfunc_CString /*line :381:30*/)(link)) defer func() func() { _cgo0 := /*line :382:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :382:37*/_Cfunc_free(_cgo0); }}()() c := func() *_Ctype_struct__GMenuModel{ _cgo0 := /*line :384:30*/v.native(); var _cgo1 *_Ctype_gchar = /*line :384:42*/cstr1; _cgoCheckPointer(_cgo0, nil); return /*line :384:48*/_Cfunc_g_menu_item_get_link(_cgo0, _cgo1); }() if c == nil { return nil } return wrapMenuModel(wrapObject(unsafe.Pointer(c))) } // SetLink is a wrapper around g_menu_item_Set_link(). func (v *MenuItem) SetLink(link string, model *MenuModel) { cstr1 := (* /*line :393:13*/_Ctype_gchar /*line :393:20*/)(( /*line :393:22*/_Cfunc_CString /*line :393:30*/)(link)) defer func() func() { _cgo0 := /*line :394:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :394:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :396:25*/v.native(); var _cgo1 *_Ctype_gchar = /*line :396:37*/cstr1; _cgo2 := /*line :396:44*/model.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :396:59*/_Cfunc_g_menu_item_set_link(_cgo0, _cgo1, _cgo2); }() } // SetActionAndTargetValue is a wrapper around g_menu_item_set_action_and_target_value() func (v *MenuItem) SetActionAndTargetValue(action string, targetValue IVariant) { cstr1 := (* /*line :401:13*/_Ctype_gchar /*line :401:20*/)(( /*line :401:22*/_Cfunc_CString /*line :401:30*/)(action)) defer func() func() { _cgo0 := /*line :402:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :402:37*/_Cfunc_free(_cgo0); }}()() var c * /*line :404:9*/_Ctype_GVariant /*line :404:19*/ if targetValue != nil { c = targetValue.ToGVariant() } func() { _cgo0 := /*line :409:44*/v.native(); var _cgo1 *_Ctype_gchar = /*line :409:56*/cstr1; _cgo2 := /*line :409:63*/c; _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :409:65*/_Cfunc_g_menu_item_set_action_and_target_value(_cgo0, _cgo1, _cgo2); }() } // UnsetAction is a wrapper around g_menu_item_set_action_and_target_value(NULL, NULL) // Unsets both action and target value. Unsetting the action also clears the target value. func (v *MenuItem) UnsetAction() { func() { _cgo0 := /*line :415:44*/v.native(); var _cgo1 *_Ctype_gchar = /*line :415:56*/nil; var _cgo2 *_Ctype_struct__GVariant = /*line :415:61*/nil; _cgoCheckPointer(_cgo0, nil); /*line :415:65*/_Cfunc_g_menu_item_set_action_and_target_value(_cgo0, _cgo1, _cgo2); }() } // SetAttributeValue is a wrapper around g_menu_item_set_attribute_value() func (v *MenuItem) SetAttributeValue(attribute string, value IVariant) { var c * /*line :420:9*/_Ctype_GVariant /*line :420:19*/ if value != nil { c = value.ToGVariant() } cstr1 := (* /*line :425:13*/_Ctype_gchar /*line :425:20*/)(( /*line :425:22*/_Cfunc_CString /*line :425:30*/)(attribute)) defer func() func() { _cgo0 := /*line :426:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :426:37*/_Cfunc_free(_cgo0); }}()() func() { _cgo0 := /*line :428:36*/v.native(); var _cgo1 *_Ctype_gchar = /*line :428:48*/cstr1; _cgo2 := /*line :428:55*/c; _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); /*line :428:57*/_Cfunc_g_menu_item_set_attribute_value(_cgo0, _cgo1, _cgo2); }() } // GetAttributeValue is a wrapper around g_menu_item_get_attribute_value() func (v *MenuItem) GetAttributeValue(attribute string, expectedType *VariantType) *Variant { cstr1 := (* /*line :433:13*/_Ctype_gchar /*line :433:20*/)(( /*line :433:22*/_Cfunc_CString /*line :433:30*/)(attribute)) defer func() func() { _cgo0 := /*line :434:15*/unsafe.Pointer(cstr1); return func() { _cgoCheckPointer(_cgo0, nil); /*line :434:37*/_Cfunc_free(_cgo0); }}()() c := func() *_Ctype_struct__GVariant{ _cgo0 := /*line :436:41*/v.native(); var _cgo1 *_Ctype_gchar = /*line :436:53*/cstr1; _cgo2 := /*line :436:60*/expectedType.native(); _cgoCheckPointer(_cgo0, nil); _cgoCheckPointer(_cgo2, nil); return /*line :436:82*/_Cfunc_g_menu_item_get_attribute_value(_cgo0, _cgo1, _cgo2); }() if c == nil { return nil } return newVariant(c) } // TODO: These require positional parameters with *any* type, according to the format string passed. // This is likely not possible to represent 1:1 in go. // gboolean g_menu_item_get_attribute () // void g_menu_item_set_attribute () // void g_menu_item_set_action_and_target ()