This file is indexed.

/usr/share/ada/adainclude/gtkada/glib-menu.ads is in libgtkada16.1.0-dev 17.0.2017-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
------------------------------------------------------------------------------
--                                                                          --
--      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       --
--                     Copyright (C) 2000-2017, AdaCore                     --
--                                                                          --
-- This library is free software;  you can redistribute it and/or modify it --
-- under terms of the  GNU General Public License  as published by the Free --
-- Software  Foundation;  either version 3,  or (at your  option) any later --
-- version. This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
--                                                                          --
------------------------------------------------------------------------------

--  <description>
--  Glib.Menu.Gmenu is a simple implementation of Glib.Menu_Model.Gmenu_Model.
--  You populate a Glib.Menu.Gmenu by adding Glib.Menu.Gmenu_Item instances to
--  it.
--
--  There are some convenience functions to allow you to directly add items
--  (avoiding Glib.Menu.Gmenu_Item) for the common cases. To add a regular
--  item, use Glib.Menu.Insert. To add a section, use Glib.Menu.Insert_Section.
--  To add a submenu, use Glib.Menu.Insert_Submenu.
--
--  </description>
pragma Ada_2005;

pragma Warnings (Off, "*is already use-visible*");
with Glib;            use Glib;
with Glib.G_Icon;     use Glib.G_Icon;
with Glib.Menu_Model; use Glib.Menu_Model;
with Glib.Object;     use Glib.Object;
with Glib.Variant;    use Glib.Variant;

package Glib.Menu is

   type Gmenu_Record is new Gmenu_Model_Record with null record;
   type Gmenu is access all Gmenu_Record'Class;

   type Gmenu_Item_Record is new GObject_Record with null record;
   type Gmenu_Item is access all Gmenu_Item_Record'Class;

   ------------------
   -- Constructors --
   ------------------

   procedure G_New (Self : out Gmenu);
   --  Creates a new Glib.Menu.Gmenu.
   --  The new menu has no items.
   --  Since: gtk+ 2.32

   procedure Initialize (Self : not null access Gmenu_Record'Class);
   --  Creates a new Glib.Menu.Gmenu.
   --  The new menu has no items.
   --  Since: gtk+ 2.32
   --  Initialize does nothing if the object was already created with another
   --  call to Initialize* or G_New.

   function Gmenu_New return Gmenu;
   --  Creates a new Glib.Menu.Gmenu.
   --  The new menu has no items.
   --  Since: gtk+ 2.32

   function Get_Type_Menu return Glib.GType;
   pragma Import (C, Get_Type_Menu, "g_menu_get_type");

   procedure G_New
      (Self            : out Gmenu_Item;
       Label           : UTF8_String := "";
       Detailed_Action : UTF8_String := "");
   --  Creates a new Glib.Menu.Gmenu_Item.
   --  If Label is non-null it is used to set the "label" attribute of the new
   --  item.
   --  If Detailed_Action is non-null it is used to set the "action" and
   --  possibly the "target" attribute of the new item. See
   --  Glib.Menu.Set_Detailed_Action for more information.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "detailed_action": the detailed action string, or null

   procedure Initialize
      (Self            : not null access Gmenu_Item_Record'Class;
       Label           : UTF8_String := "";
       Detailed_Action : UTF8_String := "");
   --  Creates a new Glib.Menu.Gmenu_Item.
   --  If Label is non-null it is used to set the "label" attribute of the new
   --  item.
   --  If Detailed_Action is non-null it is used to set the "action" and
   --  possibly the "target" attribute of the new item. See
   --  Glib.Menu.Set_Detailed_Action for more information.
   --  Since: gtk+ 2.32
   --  Initialize does nothing if the object was already created with another
   --  call to Initialize* or G_New.
   --  "label": the section label, or null
   --  "detailed_action": the detailed action string, or null

   function Gmenu_Item_New
      (Label           : UTF8_String := "";
       Detailed_Action : UTF8_String := "") return Gmenu_Item;
   --  Creates a new Glib.Menu.Gmenu_Item.
   --  If Label is non-null it is used to set the "label" attribute of the new
   --  item.
   --  If Detailed_Action is non-null it is used to set the "action" and
   --  possibly the "target" attribute of the new item. See
   --  Glib.Menu.Set_Detailed_Action for more information.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "detailed_action": the detailed action string, or null

   procedure G_New_From_Model
      (Self       : out Gmenu_Item;
       Model      : not null access Glib.Menu_Model.Gmenu_Model_Record'Class;
       Item_Index : Gint);
   --  Creates a Glib.Menu.Gmenu_Item as an exact copy of an existing menu
   --  item in a Glib.Menu_Model.Gmenu_Model.
   --  Item_Index must be valid (ie: be sure to call
   --  Glib.Menu_Model.Get_N_Items first).
   --  Since: gtk+ 2.34
   --  "model": a Glib.Menu_Model.Gmenu_Model
   --  "item_index": the index of an item in Model

   procedure Initialize_From_Model
      (Self       : not null access Gmenu_Item_Record'Class;
       Model      : not null access Glib.Menu_Model.Gmenu_Model_Record'Class;
       Item_Index : Gint);
   --  Creates a Glib.Menu.Gmenu_Item as an exact copy of an existing menu
   --  item in a Glib.Menu_Model.Gmenu_Model.
   --  Item_Index must be valid (ie: be sure to call
   --  Glib.Menu_Model.Get_N_Items first).
   --  Since: gtk+ 2.34
   --  Initialize_From_Model does nothing if the object was already created
   --  with another call to Initialize* or G_New.
   --  "model": a Glib.Menu_Model.Gmenu_Model
   --  "item_index": the index of an item in Model

   function Gmenu_Item_New_From_Model
      (Model      : not null access Glib.Menu_Model.Gmenu_Model_Record'Class;
       Item_Index : Gint) return Gmenu_Item;
   --  Creates a Glib.Menu.Gmenu_Item as an exact copy of an existing menu
   --  item in a Glib.Menu_Model.Gmenu_Model.
   --  Item_Index must be valid (ie: be sure to call
   --  Glib.Menu_Model.Get_N_Items first).
   --  Since: gtk+ 2.34
   --  "model": a Glib.Menu_Model.Gmenu_Model
   --  "item_index": the index of an item in Model

   procedure G_New_Section
      (Self    : out Gmenu_Item;
       Label   : UTF8_String := "";
       Section : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Creates a new Glib.Menu.Gmenu_Item representing a section.
   --  This is a convenience API around Glib.Menu.G_New and
   --  Glib.Menu.Set_Section.
   --  The effect of having one menu appear as a section of another is exactly
   --  as it sounds: the items from Section become a direct part of the menu
   --  that Menu_Item is added to.
   --  Visual separation is typically displayed between two non-empty
   --  sections. If Label is non-null then it will be encorporated into this
   --  visual indication. This allows for labeled subsections of a menu.
   --  As a simple example, consider a typical "Edit" menu from a simple
   --  program. It probably contains an "Undo" and "Redo" item, followed by a
   --  separator, followed by "Cut", "Copy" and "Paste".
   --  This would be accomplished by creating three Glib.Menu.Gmenu instances.
   --  The first would be populated with the "Undo" and "Redo" items, and the
   --  second with the "Cut", "Copy" and "Paste" items. The first and second
   --  menus would then be added as submenus of the third. In XML format, this
   --  would look something like the following: |[ <menu id='edit-menu'>
   --  <section> <item label='Undo'/> <item label='Redo'/> </section> <section>
   --  <item label='Cut'/> <item label='Copy'/> <item label='Paste'/>
   --  </section> </menu> ]|
   --  The following example is exactly equivalent. It is more illustrative of
   --  the exact relationship between the menus and items (keeping in mind that
   --  the 'link' element defines a new menu that is linked to the containing
   --  one). The style of the second example is more verbose and difficult to
   --  read (and therefore not recommended except for the purpose of
   --  understanding what is really going on). |[ <menu id='edit-menu'> <item>
   --  <link name='section'> <item label='Undo'/> <item label='Redo'/> </link>
   --  </item> <item> <link name='section'> <item label='Cut'/> <item
   --  label='Copy'/> <item label='Paste'/> </link> </item> </menu> ]|
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "section": a Glib.Menu_Model.Gmenu_Model with the items of the section

   procedure Initialize_Section
      (Self    : not null access Gmenu_Item_Record'Class;
       Label   : UTF8_String := "";
       Section : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Creates a new Glib.Menu.Gmenu_Item representing a section.
   --  This is a convenience API around Glib.Menu.G_New and
   --  Glib.Menu.Set_Section.
   --  The effect of having one menu appear as a section of another is exactly
   --  as it sounds: the items from Section become a direct part of the menu
   --  that Menu_Item is added to.
   --  Visual separation is typically displayed between two non-empty
   --  sections. If Label is non-null then it will be encorporated into this
   --  visual indication. This allows for labeled subsections of a menu.
   --  As a simple example, consider a typical "Edit" menu from a simple
   --  program. It probably contains an "Undo" and "Redo" item, followed by a
   --  separator, followed by "Cut", "Copy" and "Paste".
   --  This would be accomplished by creating three Glib.Menu.Gmenu instances.
   --  The first would be populated with the "Undo" and "Redo" items, and the
   --  second with the "Cut", "Copy" and "Paste" items. The first and second
   --  menus would then be added as submenus of the third. In XML format, this
   --  would look something like the following: |[ <menu id='edit-menu'>
   --  <section> <item label='Undo'/> <item label='Redo'/> </section> <section>
   --  <item label='Cut'/> <item label='Copy'/> <item label='Paste'/>
   --  </section> </menu> ]|
   --  The following example is exactly equivalent. It is more illustrative of
   --  the exact relationship between the menus and items (keeping in mind that
   --  the 'link' element defines a new menu that is linked to the containing
   --  one). The style of the second example is more verbose and difficult to
   --  read (and therefore not recommended except for the purpose of
   --  understanding what is really going on). |[ <menu id='edit-menu'> <item>
   --  <link name='section'> <item label='Undo'/> <item label='Redo'/> </link>
   --  </item> <item> <link name='section'> <item label='Cut'/> <item
   --  label='Copy'/> <item label='Paste'/> </link> </item> </menu> ]|
   --  Since: gtk+ 2.32
   --  Initialize_Section does nothing if the object was already created with
   --  another call to Initialize* or G_New.
   --  "label": the section label, or null
   --  "section": a Glib.Menu_Model.Gmenu_Model with the items of the section

   function Gmenu_Item_New_Section
      (Label   : UTF8_String := "";
       Section : not null access Glib.Menu_Model.Gmenu_Model_Record'Class)
       return Gmenu_Item;
   --  Creates a new Glib.Menu.Gmenu_Item representing a section.
   --  This is a convenience API around Glib.Menu.G_New and
   --  Glib.Menu.Set_Section.
   --  The effect of having one menu appear as a section of another is exactly
   --  as it sounds: the items from Section become a direct part of the menu
   --  that Menu_Item is added to.
   --  Visual separation is typically displayed between two non-empty
   --  sections. If Label is non-null then it will be encorporated into this
   --  visual indication. This allows for labeled subsections of a menu.
   --  As a simple example, consider a typical "Edit" menu from a simple
   --  program. It probably contains an "Undo" and "Redo" item, followed by a
   --  separator, followed by "Cut", "Copy" and "Paste".
   --  This would be accomplished by creating three Glib.Menu.Gmenu instances.
   --  The first would be populated with the "Undo" and "Redo" items, and the
   --  second with the "Cut", "Copy" and "Paste" items. The first and second
   --  menus would then be added as submenus of the third. In XML format, this
   --  would look something like the following: |[ <menu id='edit-menu'>
   --  <section> <item label='Undo'/> <item label='Redo'/> </section> <section>
   --  <item label='Cut'/> <item label='Copy'/> <item label='Paste'/>
   --  </section> </menu> ]|
   --  The following example is exactly equivalent. It is more illustrative of
   --  the exact relationship between the menus and items (keeping in mind that
   --  the 'link' element defines a new menu that is linked to the containing
   --  one). The style of the second example is more verbose and difficult to
   --  read (and therefore not recommended except for the purpose of
   --  understanding what is really going on). |[ <menu id='edit-menu'> <item>
   --  <link name='section'> <item label='Undo'/> <item label='Redo'/> </link>
   --  </item> <item> <link name='section'> <item label='Cut'/> <item
   --  label='Copy'/> <item label='Paste'/> </link> </item> </menu> ]|
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "section": a Glib.Menu_Model.Gmenu_Model with the items of the section

   procedure G_New_Submenu
      (Self    : out Gmenu_Item;
       Label   : UTF8_String := "";
       Submenu : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Creates a new Glib.Menu.Gmenu_Item representing a submenu.
   --  This is a convenience API around Glib.Menu.G_New and
   --  Glib.Menu.Set_Submenu.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "submenu": a Glib.Menu_Model.Gmenu_Model with the items of the submenu

   procedure Initialize_Submenu
      (Self    : not null access Gmenu_Item_Record'Class;
       Label   : UTF8_String := "";
       Submenu : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Creates a new Glib.Menu.Gmenu_Item representing a submenu.
   --  This is a convenience API around Glib.Menu.G_New and
   --  Glib.Menu.Set_Submenu.
   --  Since: gtk+ 2.32
   --  Initialize_Submenu does nothing if the object was already created with
   --  another call to Initialize* or G_New.
   --  "label": the section label, or null
   --  "submenu": a Glib.Menu_Model.Gmenu_Model with the items of the submenu

   function Gmenu_Item_New_Submenu
      (Label   : UTF8_String := "";
       Submenu : not null access Glib.Menu_Model.Gmenu_Model_Record'Class)
       return Gmenu_Item;
   --  Creates a new Glib.Menu.Gmenu_Item representing a submenu.
   --  This is a convenience API around Glib.Menu.G_New and
   --  Glib.Menu.Set_Submenu.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "submenu": a Glib.Menu_Model.Gmenu_Model with the items of the submenu

   function Get_Type_Menu_Item return Glib.GType;
   pragma Import (C, Get_Type_Menu_Item, "g_menu_item_get_type");

   -------------
   -- Methods --
   -------------

   procedure Append
      (Self            : not null access Gmenu_Record;
       Label           : UTF8_String := "";
       Detailed_Action : UTF8_String := "");
   --  Convenience function for appending a normal menu item to the end of
   --  Menu. Combine Glib.Menu.G_New and Glib.Menu.Insert_Item for a more
   --  flexible alternative.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "detailed_action": the detailed action string, or null

   procedure Append_Item
      (Self : not null access Gmenu_Record;
       Item : not null access Gmenu_Item_Record'Class);
   --  Appends Item to the end of Menu.
   --  See Glib.Menu.Insert_Item for more information.
   --  Since: gtk+ 2.32
   --  "item": a Glib.Menu.Gmenu_Item to append

   procedure Append_Section
      (Self    : not null access Gmenu_Record;
       Label   : UTF8_String := "";
       Section : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Convenience function for appending a section menu item to the end of
   --  Menu. Combine Glib.Menu.G_New_Section and Glib.Menu.Insert_Item for a
   --  more flexible alternative.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "section": a Glib.Menu_Model.Gmenu_Model with the items of the section

   procedure Append_Submenu
      (Self    : not null access Gmenu_Record;
       Label   : UTF8_String := "";
       Submenu : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Convenience function for appending a submenu menu item to the end of
   --  Menu. Combine Glib.Menu.G_New_Submenu and Glib.Menu.Insert_Item for a
   --  more flexible alternative.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "submenu": a Glib.Menu_Model.Gmenu_Model with the items of the submenu

   procedure Freeze (Self : not null access Gmenu_Record);
   --  Marks Menu as frozen.
   --  After the menu is frozen, it is an error to attempt to make any changes
   --  to it. In effect this means that the Glib.Menu.Gmenu API must no longer
   --  be used.
   --  This function causes Glib.Menu_Model.Is_Mutable to begin returning
   --  False, which has some positive performance implications.
   --  Since: gtk+ 2.32

   procedure Insert
      (Self            : not null access Gmenu_Record;
       Position        : Gint;
       Label           : UTF8_String := "";
       Detailed_Action : UTF8_String := "");
   --  Convenience function for inserting a normal menu item into Menu.
   --  Combine Glib.Menu.G_New and Glib.Menu.Insert_Item for a more flexible
   --  alternative.
   --  Since: gtk+ 2.32
   --  "position": the position at which to insert the item
   --  "label": the section label, or null
   --  "detailed_action": the detailed action string, or null

   procedure Insert_Item
      (Self     : not null access Gmenu_Record;
       Position : Gint;
       Item     : not null access Gmenu_Item_Record'Class);
   --  Inserts Item into Menu.
   --  The "insertion" is actually done by copying all of the attribute and
   --  link values of Item and using them to form a new item within Menu. As
   --  such, Item itself is not really inserted, but rather, a menu item that
   --  is exactly the same as the one presently described by Item.
   --  This means that Item is essentially useless after the insertion occurs.
   --  Any changes you make to it are ignored unless it is inserted again (at
   --  which point its updated values will be copied).
   --  You should probably just free Item once you're done.
   --  There are many convenience functions to take care of common cases. See
   --  Glib.Menu.Insert, Glib.Menu.Insert_Section and Glib.Menu.Insert_Submenu
   --  as well as "prepend" and "append" variants of each of these functions.
   --  Since: gtk+ 2.32
   --  "position": the position at which to insert the item
   --  "item": the Glib.Menu.Gmenu_Item to insert

   procedure Insert_Section
      (Self     : not null access Gmenu_Record;
       Position : Gint;
       Label    : UTF8_String := "";
       Section  : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Convenience function for inserting a section menu item into Menu.
   --  Combine Glib.Menu.G_New_Section and Glib.Menu.Insert_Item for a more
   --  flexible alternative.
   --  Since: gtk+ 2.32
   --  "position": the position at which to insert the item
   --  "label": the section label, or null
   --  "section": a Glib.Menu_Model.Gmenu_Model with the items of the section

   procedure Insert_Submenu
      (Self     : not null access Gmenu_Record;
       Position : Gint;
       Label    : UTF8_String := "";
       Submenu  : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Convenience function for inserting a submenu menu item into Menu.
   --  Combine Glib.Menu.G_New_Submenu and Glib.Menu.Insert_Item for a more
   --  flexible alternative.
   --  Since: gtk+ 2.32
   --  "position": the position at which to insert the item
   --  "label": the section label, or null
   --  "submenu": a Glib.Menu_Model.Gmenu_Model with the items of the submenu

   procedure Prepend
      (Self            : not null access Gmenu_Record;
       Label           : UTF8_String := "";
       Detailed_Action : UTF8_String := "");
   --  Convenience function for prepending a normal menu item to the start of
   --  Menu. Combine Glib.Menu.G_New and Glib.Menu.Insert_Item for a more
   --  flexible alternative.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "detailed_action": the detailed action string, or null

   procedure Prepend_Item
      (Self : not null access Gmenu_Record;
       Item : not null access Gmenu_Item_Record'Class);
   --  Prepends Item to the start of Menu.
   --  See Glib.Menu.Insert_Item for more information.
   --  Since: gtk+ 2.32
   --  "item": a Glib.Menu.Gmenu_Item to prepend

   procedure Prepend_Section
      (Self    : not null access Gmenu_Record;
       Label   : UTF8_String := "";
       Section : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Convenience function for prepending a section menu item to the start of
   --  Menu. Combine Glib.Menu.G_New_Section and Glib.Menu.Insert_Item for a
   --  more flexible alternative.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "section": a Glib.Menu_Model.Gmenu_Model with the items of the section

   procedure Prepend_Submenu
      (Self    : not null access Gmenu_Record;
       Label   : UTF8_String := "";
       Submenu : not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Convenience function for prepending a submenu menu item to the start of
   --  Menu. Combine Glib.Menu.G_New_Submenu and Glib.Menu.Insert_Item for a
   --  more flexible alternative.
   --  Since: gtk+ 2.32
   --  "label": the section label, or null
   --  "submenu": a Glib.Menu_Model.Gmenu_Model with the items of the submenu

   procedure Remove (Self : not null access Gmenu_Record; Position : Gint);
   --  Removes an item from the menu.
   --  Position gives the index of the item to remove.
   --  It is an error if position is not in range the range from 0 to one less
   --  than the number of items in the menu.
   --  It is not possible to remove items by identity since items are added to
   --  the menu simply by copying their links and attributes (ie: identity of
   --  the item itself is not preserved).
   --  Since: gtk+ 2.32
   --  "position": the position of the item to remove

   procedure Remove_All (Self : not null access Gmenu_Record);
   --  Removes all items in the menu.
   --  Since: gtk+ 2.38

   function Get_Attribute_Value
      (Self          : not null access Gmenu_Item_Record;
       Attribute     : UTF8_String;
       Expected_Type : Glib.Variant.Gvariant_Type)
       return Glib.Variant.Gvariant;
   --  Queries the named Attribute on Menu_Item.
   --  If Expected_Type is specified and the attribute does not have this
   --  type, null is returned. null is also returned if the attribute simply
   --  does not exist.
   --  Since: gtk+ 2.34
   --  "attribute": the attribute name to query
   --  "expected_type": the expected type of the attribute

   procedure Set_Attribute_Value
      (Self      : not null access Gmenu_Item_Record;
       Attribute : UTF8_String;
       Value     : Glib.Variant.Gvariant);
   --  Sets or unsets an attribute on Menu_Item.
   --  The attribute to set or unset is specified by Attribute. This can be
   --  one of the standard attribute names G_MENU_ATTRIBUTE_LABEL,
   --  G_MENU_ATTRIBUTE_ACTION, G_MENU_ATTRIBUTE_TARGET, or a custom attribute
   --  name. Attribute names are restricted to lowercase characters, numbers
   --  and '-'. Furthermore, the names must begin with a lowercase character,
   --  must not end with a '-', and must not contain consecutive dashes.
   --  must consist only of lowercase ASCII characters, digits and '-'.
   --  If Value is non-null then it is used as the new value for the
   --  attribute. If Value is null then the attribute is unset. If the Value
   --  Glib.Variant.Gvariant is floating, it is consumed.
   --  See also g_menu_item_set_attribute for a more convenient way to do the
   --  same.
   --  Since: gtk+ 2.32
   --  "attribute": the attribute to set
   --  "value": a Glib.Variant.Gvariant to use as the value, or null

   function Get_Link
      (Self : not null access Gmenu_Item_Record;
       Link : UTF8_String) return Glib.Menu_Model.Gmenu_Model;
   --  Queries the named Link on Menu_Item.
   --  Since: gtk+ 2.34
   --  "link": the link name to query

   procedure Set_Link
      (Self  : not null access Gmenu_Item_Record;
       Link  : UTF8_String;
       Model : access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Creates a link from Menu_Item to Model if non-null, or unsets it.
   --  Links are used to establish a relationship between a particular menu
   --  item and another menu. For example, G_MENU_LINK_SUBMENU is used to
   --  associate a submenu with a particular menu item, and G_MENU_LINK_SECTION
   --  is used to create a section. Other types of link can be used, but there
   --  is no guarantee that clients will be able to make sense of them. Link
   --  types are restricted to lowercase characters, numbers and '-'.
   --  Furthermore, the names must begin with a lowercase character, must not
   --  end with a '-', and must not contain consecutive dashes.
   --  Since: gtk+ 2.32
   --  "link": type of link to establish or unset
   --  "model": the Glib.Menu_Model.Gmenu_Model to link to (or null to unset)

   procedure Set_Action_And_Target_Value
      (Self         : not null access Gmenu_Item_Record;
       Action       : UTF8_String := "";
       Target_Value : Glib.Variant.Gvariant);
   --  Sets or unsets the "action" and "target" attributes of Menu_Item.
   --  If Action is null then both the "action" and "target" attributes are
   --  unset (and Target_Value is ignored).
   --  If Action is non-null then the "action" attribute is set. The "target"
   --  attribute is then set to the value of Target_Value if it is non-null or
   --  unset otherwise.
   --  Normal menu items (ie: not submenu, section or other custom item types)
   --  are expected to have the "action" attribute set to identify the action
   --  that they are associated with. The state type of the action help to
   --  determine the disposition of the menu item. See Glib.Action.Gaction and
   --  Glib.Action_Group.Gaction_Group for an overview of actions.
   --  In general, clicking on the menu item will result in activation of the
   --  named action with the "target" attribute given as the parameter to the
   --  action invocation. If the "target" attribute is not set then the action
   --  is invoked with no parameter.
   --  If the action has no state then the menu item is usually drawn as a
   --  plain menu item (ie: with no additional decoration).
   --  If the action has a boolean state then the menu item is usually drawn
   --  as a toggle menu item (ie: with a checkmark or equivalent indication).
   --  The item should be marked as 'toggled' or 'checked' when the boolean
   --  state is True.
   --  If the action has a string state then the menu item is usually drawn as
   --  a radio menu item (ie: with a radio bullet or equivalent indication).
   --  The item should be marked as 'selected' when the string state is equal
   --  to the value of the Target property.
   --  See g_menu_item_set_action_and_target or Glib.Menu.Set_Detailed_Action
   --  for two equivalent calls that are probably more convenient for most
   --  uses.
   --  Since: gtk+ 2.32
   --  "action": the name of the action for this item
   --  "target_value": a Glib.Variant.Gvariant to use as the action target

   procedure Set_Detailed_Action
      (Self            : not null access Gmenu_Item_Record;
       Detailed_Action : UTF8_String);
   --  Sets the "action" and possibly the "target" attribute of Menu_Item.
   --  The format of Detailed_Action is the same format parsed by
   --  g_action_parse_detailed_name.
   --  See g_menu_item_set_action_and_target or
   --  Glib.Menu.Set_Action_And_Target_Value for more flexible (but slightly
   --  less convenient) alternatives.
   --  See also Glib.Menu.Set_Action_And_Target_Value for a description of the
   --  semantics of the action and target attributes.
   --  Since: gtk+ 2.32
   --  "detailed_action": the "detailed" action string

   procedure Set_Icon
      (Self : not null access Gmenu_Item_Record;
       Icon : Glib.G_Icon.G_Icon);
   --  Sets (or unsets) the icon on Menu_Item.
   --  This call is the same as calling Glib.G_Icon.Serialize and using the
   --  result as the value to Glib.Menu.Set_Attribute_Value for
   --  G_MENU_ATTRIBUTE_ICON.
   --  This API is only intended for use with "noun" menu items; things like
   --  bookmarks or applications in an "Open With" menu. Don't use it on menu
   --  items corresponding to verbs (eg: stock icons for 'Save' or 'Quit').
   --  If Icon is null then the icon is unset.
   --  Since: gtk+ 2.38
   --  "icon": a Glib.G_Icon.G_Icon, or null

   procedure Set_Label
      (Self  : not null access Gmenu_Item_Record;
       Label : UTF8_String := "");
   --  Sets or unsets the "label" attribute of Menu_Item.
   --  If Label is non-null it is used as the label for the menu item. If it
   --  is null then the label attribute is unset.
   --  Since: gtk+ 2.32
   --  "label": the label to set, or null to unset

   procedure Set_Section
      (Self    : not null access Gmenu_Item_Record;
       Section : access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Sets or unsets the "section" link of Menu_Item to Section.
   --  The effect of having one menu appear as a section of another is exactly
   --  as it sounds: the items from Section become a direct part of the menu
   --  that Menu_Item is added to. See Glib.Menu.G_New_Section for more
   --  information about what it means for a menu item to be a section.
   --  Since: gtk+ 2.32
   --  "section": a Glib.Menu_Model.Gmenu_Model, or null

   procedure Set_Submenu
      (Self    : not null access Gmenu_Item_Record;
       Submenu : access Glib.Menu_Model.Gmenu_Model_Record'Class);
   --  Sets or unsets the "submenu" link of Menu_Item to Submenu.
   --  If Submenu is non-null, it is linked to. If it is null then the link is
   --  unset.
   --  The effect of having one menu appear as a submenu of another is exactly
   --  as it sounds.
   --  Since: gtk+ 2.32
   --  "submenu": a Glib.Menu_Model.Gmenu_Model, or null

end Glib.Menu;