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
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
]>
<refentry id="libdbusmenu-glib-DbusmenuMenuitem">
<refmeta>
<refentrytitle role="top_of_page" id="libdbusmenu-glib-DbusmenuMenuitem.top_of_page">DbusmenuMenuitem</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
LIBDBUSMENU-GLIB Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>DbusmenuMenuitem</refname>
<refpurpose>A lowlevel represenation of a menuitem</refpurpose>
</refnamediv>
<refsect1 id="libdbusmenu-glib-DbusmenuMenuitem.stability-level">
<title>Stability Level</title>
Unstable, unless otherwise indicated
</refsect1>
<refsynopsisdiv id="libdbusmenu-glib-DbusmenuMenuitem.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
#include <libdbusmenu-glib/menuitem.h>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-PROPERTY-CHANGED:CAPS">DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-ITEM-ACTIVATED:CAPS">DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-CHILD-ADDED:CAPS">DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-CHILD-REMOVED:CAPS">DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-CHILD-MOVED:CAPS">DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-EVENT:CAPS">DBUSMENU_MENUITEM_SIGNAL_EVENT</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-REALIZED:CAPS">DBUSMENU_MENUITEM_SIGNAL_REALIZED</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-REALIZED-ID:CAPS">DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-ABOUT-TO-SHOW:CAPS">DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW</link>
#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-SHOW-TO-USER:CAPS">DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-TYPE:CAPS">DBUSMENU_MENUITEM_PROP_TYPE</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-VISIBLE:CAPS">DBUSMENU_MENUITEM_PROP_VISIBLE</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS">DBUSMENU_MENUITEM_PROP_ENABLED</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-LABEL:CAPS">DBUSMENU_MENUITEM_PROP_LABEL</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS">DBUSMENU_MENUITEM_PROP_ICON_NAME</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS">DBUSMENU_MENUITEM_PROP_ICON_DATA</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS">DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS">DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS">DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</link>
#define <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS">DBUSMENU_MENUITEM_PROP_SHORTCUT</link>
#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS">DBUSMENU_MENUITEM_TOGGLE_CHECK</link>
#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS">DBUSMENU_MENUITEM_TOGGLE_RADIO</link>
#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS">DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</link>
#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-CHECKED:CAPS">DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED</link>
#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-UNKNOWN:CAPS">DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN</link>
#define <link linkend="DBUSMENU-MENUITEM-ICON-NAME-BLANK:CAPS">DBUSMENU_MENUITEM_ICON_NAME_BLANK</link>
#define <link linkend="DBUSMENU-MENUITEM-CHILD-DISPLAY-SUBMENU:CAPS">DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU</link>
#define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-ALT:CAPS">DBUSMENU_MENUITEM_SHORTCUT_ALT</link>
#define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS">DBUSMENU_MENUITEM_SHORTCUT_CONTROL</link>
#define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS">DBUSMENU_MENUITEM_SHORTCUT_SHIFT</link>
#define <link linkend="DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS">DBUSMENU_MENUITEM_SHORTCUT_SUPER</link>
struct <link linkend="DbusmenuMenuitem">DbusmenuMenuitem</link>;
<link linkend="void"><returnvalue>void</returnvalue></link> (<link linkend="dbusmenu-menuitem-about-to-show-cb">*dbusmenu_menuitem_about_to_show_cb</link>)
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);
<link linkend="GVariant"><returnvalue>GVariant</returnvalue></link> * (<link linkend="dbusmenu-menuitem-buildvariant-slot-t">*dbusmenu_menuitem_buildvariant_slot_t</link>)
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gchar"><type>gchar</type></link> **properties</parameter>);
struct <link linkend="DbusmenuMenuitemClass">DbusmenuMenuitemClass</link>;
<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-new">dbusmenu_menuitem_new</link> (<parameter><type>void</type></parameter>);
<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-new-with-id">dbusmenu_menuitem_new_with_id</link> (<parameter><link linkend="gint"><type>gint</type></link> id</parameter>);
<link linkend="gint"><returnvalue>gint</returnvalue></link> <link linkend="dbusmenu-menuitem-get-id">dbusmenu_menuitem_get_id</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
<link linkend="GList"><returnvalue>GList</returnvalue></link> * <link linkend="dbusmenu-menuitem-get-children">dbusmenu_menuitem_get_children</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
<link linkend="GList"><returnvalue>GList</returnvalue></link> * <link linkend="dbusmenu-menuitem-take-children">dbusmenu_menuitem_take_children</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
<link linkend="guint"><returnvalue>guint</returnvalue></link> <link linkend="dbusmenu-menuitem-get-position">dbusmenu_menuitem_get_position</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);
<link linkend="guint"><returnvalue>guint</returnvalue></link> <link linkend="dbusmenu-menuitem-get-position-realized">dbusmenu_menuitem_get_position_realized</link>
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-append">dbusmenu_menuitem_child_append</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-prepend">dbusmenu_menuitem_child_prepend</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-delete">dbusmenu_menuitem_child_delete</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-add-position">dbusmenu_menuitem_child_add_position</link>
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> position</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-reorder">dbusmenu_menuitem_child_reorder</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> position</parameter>);
<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-child-find">dbusmenu_menuitem_child_find</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gint"><type>gint</type></link> id</parameter>);
<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-find-id">dbusmenu_menuitem_find_id</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gint"><type>gint</type></link> id</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set">dbusmenu_menuitem_property_set</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-bool">dbusmenu_menuitem_property_set_bool</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter>const <link linkend="gboolean"><type>gboolean</type></link> value</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-int">dbusmenu_menuitem_property_set_int</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter>const <link linkend="gint"><type>gint</type></link> value</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-variant">dbusmenu_menuitem_property_set_variant</link>
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter><link linkend="GVariant"><type>GVariant</type></link> *value</parameter>);
const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> * <link linkend="dbusmenu-menuitem-property-get">dbusmenu_menuitem_property_get</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-get-bool">dbusmenu_menuitem_property_get_bool</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);
<link linkend="gint"><returnvalue>gint</returnvalue></link> <link linkend="dbusmenu-menuitem-property-get-int">dbusmenu_menuitem_property_get_int</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);
<link linkend="GVariant"><returnvalue>GVariant</returnvalue></link> * <link linkend="dbusmenu-menuitem-property-get-variant">dbusmenu_menuitem_property_get_variant</link>
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-exist">dbusmenu_menuitem_property_exist</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);
<link linkend="GList"><returnvalue>GList</returnvalue></link> * <link linkend="dbusmenu-menuitem-properties-list">dbusmenu_menuitem_properties_list</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
<link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link> * <link linkend="dbusmenu-menuitem-properties-copy">dbusmenu_menuitem_properties_copy</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-property-remove">dbusmenu_menuitem_property_remove</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-set-root">dbusmenu_menuitem_set_root</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gboolean"><type>gboolean</type></link> root</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-get-root">dbusmenu_menuitem_get_root</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-foreach">dbusmenu_menuitem_foreach</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="void"><type>void</type></link> (*func) (DbusmenuMenuitem * mi, gpointer data)</parameter>,
<parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-handle-event">dbusmenu_menuitem_handle_event</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
<parameter><link linkend="GVariant"><type>GVariant</type></link> *variant</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> timestamp</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-send-about-to-show">dbusmenu_menuitem_send_about_to_show</link>
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="void"><type>void</type></link> (*cb) (DbusmenuMenuitem * mi, gpointer user_data)</parameter>,
<parameter><link linkend="gpointer"><type>gpointer</type></link> cb_data</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-show-to-user">dbusmenu_menuitem_show_to_user</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> timestamp</parameter>);
<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-get-parent">dbusmenu_menuitem_get_parent</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-set-parent">dbusmenu_menuitem_set_parent</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-unparent">dbusmenu_menuitem_unparent</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="libdbusmenu-glib-DbusmenuMenuitem.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> is the lowest level of represenation of a
single item in a menu. It gets created on the server side
and copied over to the client side where it gets rendered. As
the server starts to change it, and grow it, and do all kinds
of fun stuff that information is transfered over DBus and the
client updates it's understanding of the object model.
</para>
<para>
Most people using either the client or the server should be
able to deal mostly with <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects. These
are simple, but then they can be attached to more complex
objects and handled appropriately.
</para>
</refsect1>
<refsect1 id="libdbusmenu-glib-DbusmenuMenuitem.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-PROPERTY-CHANGED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-PROPERTY-CHANGED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED "property-changed"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-property-changed"><type>"property-changed"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-ITEM-ACTIVATED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-ITEM-ACTIVATED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED "item-activated"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-item-activated"><type>"item-activated"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-CHILD-ADDED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-CHILD-ADDED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED "child-added"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-child-added"><type>"child-added"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-CHILD-REMOVED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-CHILD-REMOVED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED "child-removed"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-child-removed"><type>"child-removed"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-CHILD-MOVED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-CHILD-MOVED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED "child-moved"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-child-moved"><type>"child-moved"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-EVENT:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_EVENT</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-EVENT:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_EVENT</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_EVENT "event"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-event"><type>"event"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-REALIZED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_REALIZED</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-REALIZED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_REALIZED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_REALIZED "realized"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-realized"><type>"realized"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-REALIZED-ID:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-REALIZED-ID:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID (g_signal_lookup(DBUSMENU_MENUITEM_SIGNAL_REALIZED, DBUSMENU_TYPE_MENUITEM))
</programlisting>
<para>
ID to attach to signal <link linkend="DbusmenuServer-realized"><type>"realized"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-ABOUT-TO-SHOW:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-ABOUT-TO-SHOW:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW "about-to-show"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-about-to-show"><type>"about-to-show"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-SHOW-TO-USER:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER</title>
<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-SHOW-TO-USER:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER "show-to-user"
</programlisting>
<para>
String to attach to signal <link linkend="DbusmenuServer-show-to-user"><type>"show-to-user"</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-TYPE:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_TYPE</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-TYPE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_TYPE</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_TYPE "type"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property used to represent what type of menuitem
this object represents. Type: <link linkend="G-VARIANT-TYPE-STRING:CAPS"><type>G_VARIANT_TYPE_STRING</type></link>.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-VISIBLE:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_VISIBLE</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-VISIBLE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_VISIBLE</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_VISIBLE "visible"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property used to represent whether the menuitem
should be shown or not. Type: <link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS"><type>G_VARIANT_TYPE_BOOLEAN</type></link>.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_ENABLED</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS"><primary>DBUSMENU_MENUITEM_PROP_ENABLED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_ENABLED "enabled"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property used to represent whether the menuitem
is clickable or not. Type: <link linkend="G-VARIANT-TYPE-BOOLEAN:CAPS"><type>G_VARIANT_TYPE_BOOLEAN</type></link>.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-LABEL:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_LABEL</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-LABEL:CAPS"><primary>DBUSMENU_MENUITEM_PROP_LABEL</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_LABEL "label"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property used for the text on the menu item.
Type: <link linkend="G-VARIANT-TYPE-STRING:CAPS"><type>G_VARIANT_TYPE_STRING</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_ICON_NAME</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS"><primary>DBUSMENU_MENUITEM_PROP_ICON_NAME</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_ICON_NAME "icon-name"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property that is the name of the icon under the
Freedesktop.org icon naming spec. Type: <link linkend="G-VARIANT-TYPE-STRING:CAPS"><type>G_VARIANT_TYPE_STRING</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_ICON_DATA</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS"><primary>DBUSMENU_MENUITEM_PROP_ICON_DATA</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_ICON_DATA "icon-data"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property that is the raw data of a custom icon
used in the application. Type: <link linkend="G-VARIANT-TYPE-VARIANT:CAPS"><type>G_VARIANT_TYPE_VARIANT</type></link>
</para>
<para>
It is recommended that this is not set directly but instead the
libdbusmenu-gtk library is used with the function <link linkend="dbusmenu-menuitem-property-set-image"><function>dbusmenu_menuitem_property_set_image()</function></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE "toggle-type"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property that says what type of toggle entry should
be shown in the menu. Should be either <link linkend="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"><type>DBUSMENU_MENUITEM_TOGGLE_CHECK</type></link>
or <link linkend="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS"><type>DBUSMENU_MENUITEM_TOGGLE_RADIO</type></link>. Type: <link linkend="G-VARIANT-TYPE-STRING:CAPS"><type>G_VARIANT_TYPE_STRING</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_TOGGLE_STATE "toggle-state"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property that says what state a toggle entry should
be shown as the menu. Should be either <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS"><type>DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</type></link>
<link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-CHECKED:CAPS"><type>DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED</type></link> or <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATUE-UNKNOWN:CAPS"><type>DBUSMENU_MENUITEM_TOGGLE_STATUE_UNKNOWN</type></link>.
Type: <link linkend="G-VARIANT-TYPE-INT32:CAPS"><type>G_VARIANT_TYPE_INT32</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"><primary>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property that tells how the children of this menuitem
should be displayed. Most likely this will be unset or of the value
<link linkend="DBUSMENU-MENUITEM-CHILD-DISPLAY-SUBMENU:CAPS"><type>DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU</type></link>. Type: <link linkend="G-VARIANT-TYPE-STRING:CAPS"><type>G_VARIANT_TYPE_STRING</type></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_PROP_SHORTCUT</title>
<indexterm zone="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"><primary>DBUSMENU_MENUITEM_PROP_SHORTCUT</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_PROP_SHORTCUT "shortcut"
</programlisting>
<para>
<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property that is the entries that represent a shortcut
to activate the menuitem. It is an array of arrays of strings.
Type: <link linkend="G-VARIANT-TYPE-ARRAY:CAPS"><type>G_VARIANT_TYPE_ARRAY</type></link>
</para>
<para>
It is recommended that this is not set directly but instead the
libdbusmenu-gtk library is used with the function <link linkend="dbusmenu-menuitem-property-set-shortcut"><function>dbusmenu_menuitem_property_set_shortcut()</function></link>
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_TOGGLE_CHECK</title>
<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_CHECK</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_CHECK "checkmark"
</programlisting>
<para>
Used to set <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS"><type>DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</type></link> to be a standard
check mark item.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_TOGGLE_RADIO</title>
<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_RADIO</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_RADIO "radio"
</programlisting>
<para>
Used to set <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS"><type>DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</type></link> to be a standard
radio item.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</title>
<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED 0
</programlisting>
<para>
Used to set <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"><type>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</type></link> so that the menu's
toggle item is empty.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-STATE-CHECKED:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED</title>
<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-STATE-CHECKED:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED 1
</programlisting>
<para>
Used to set <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"><type>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</type></link> so that the menu's
toggle item is filled.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-STATE-UNKNOWN:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN</title>
<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-STATE-UNKNOWN:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN -1
</programlisting>
<para>
Used to set <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"><type>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</type></link> so that the menu's
toggle item is undecided.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-ICON-NAME-BLANK:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_ICON_NAME_BLANK</title>
<indexterm zone="DBUSMENU-MENUITEM-ICON-NAME-BLANK:CAPS"><primary>DBUSMENU_MENUITEM_ICON_NAME_BLANK</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_ICON_NAME_BLANK "blank-icon"
</programlisting>
<para>
Used to set <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"><type>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</type></link> so that the menu's
toggle item is undecided.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-CHILD-DISPLAY-SUBMENU:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU</title>
<indexterm zone="DBUSMENU-MENUITEM-CHILD-DISPLAY-SUBMENU:CAPS"><primary>DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu"
</programlisting>
<para>
Used in <link linkend="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"><type>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</type></link> to have the
subitems displayed as a submenu.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SHORTCUT-ALT:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SHORTCUT_ALT</title>
<indexterm zone="DBUSMENU-MENUITEM-SHORTCUT-ALT:CAPS"><primary>DBUSMENU_MENUITEM_SHORTCUT_ALT</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SHORTCUT_ALT "Alt"
</programlisting>
<para>
Used in <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"><type>DBUSMENU_MENUITEM_PROP_SHORTCUT</type></link> to represent the
alternate key.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SHORTCUT_CONTROL</title>
<indexterm zone="DBUSMENU-MENUITEM-SHORTCUT-CONTROL:CAPS"><primary>DBUSMENU_MENUITEM_SHORTCUT_CONTROL</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SHORTCUT_CONTROL "Control"
</programlisting>
<para>
Used in <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"><type>DBUSMENU_MENUITEM_PROP_SHORTCUT</type></link> to represent the
control key.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SHORTCUT_SHIFT</title>
<indexterm zone="DBUSMENU-MENUITEM-SHORTCUT-SHIFT:CAPS"><primary>DBUSMENU_MENUITEM_SHORTCUT_SHIFT</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SHORTCUT_SHIFT "Shift"
</programlisting>
<para>
Used in <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"><type>DBUSMENU_MENUITEM_PROP_SHORTCUT</type></link> to represent the
shift key.
</para></refsect2>
<refsect2 id="DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS" role="macro">
<title>DBUSMENU_MENUITEM_SHORTCUT_SUPER</title>
<indexterm zone="DBUSMENU-MENUITEM-SHORTCUT-SUPER:CAPS"><primary>DBUSMENU_MENUITEM_SHORTCUT_SUPER</primary></indexterm>
<programlisting>#define DBUSMENU_MENUITEM_SHORTCUT_SUPER "Super"
</programlisting>
<para>
Used in <link linkend="DBUSMENU-MENUITEM-PROP-SHORTCUT:CAPS"><type>DBUSMENU_MENUITEM_PROP_SHORTCUT</type></link> to represent the
super key.
</para></refsect2>
<refsect2 id="DbusmenuMenuitem" role="struct">
<title>struct DbusmenuMenuitem</title>
<indexterm zone="DbusmenuMenuitem"><primary>DbusmenuMenuitem</primary></indexterm>
<programlisting>struct DbusmenuMenuitem {
GObject parent;
/*< Private >*/
DbusmenuMenuitemPrivate * priv;
};
</programlisting>
<para>
This is the <link linkend="GObject"><type>GObject</type></link> based object that represents a menu
item. It gets created the same on both the client and
the server side and libdbusmenu-glib does the work of making
this object model appear on both sides of DBus. Simple
really, though through updates and people coming on and off
the bus it can lead to lots of fun complex scenarios.
</para><variablelist role="struct">
<varlistentry><term><link linkend="GObject"><type>GObject</type></link> <structfield id="DbusmenuMenuitem.parent">parent</structfield>;</term>
<listitem><simpara>Parent object</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="DbusmenuMenuitemPrivate"><type>DbusmenuMenuitemPrivate</type></link> *<structfield id="DbusmenuMenuitem.priv">priv</structfield>;</term>
<listitem><simpara>Private data</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-about-to-show-cb" role="function">
<title>dbusmenu_menuitem_about_to_show_cb ()</title>
<indexterm zone="dbusmenu-menuitem-about-to-show-cb"><primary>dbusmenu_menuitem_about_to_show_cb</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> (*dbusmenu_menuitem_about_to_show_cb)
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>
Callback prototype for a callback that is called when the
menu should be shown.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>Menu item that should be shown</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>Extra user data sent with the function. <emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-buildvariant-slot-t" role="function">
<title>dbusmenu_menuitem_buildvariant_slot_t ()</title>
<indexterm zone="dbusmenu-menuitem-buildvariant-slot-t"><primary>dbusmenu_menuitem_buildvariant_slot_t</primary></indexterm>
<programlisting><link linkend="GVariant"><returnvalue>GVariant</returnvalue></link> * (*dbusmenu_menuitem_buildvariant_slot_t)
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gchar"><type>gchar</type></link> **properties</parameter>);</programlisting>
<para>
This is the function that is called to represent this menu item
as a variant. Should call it's own children.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>Menu item that should be built from. <emphasis role="annotation">[<acronym>in</acronym>]</emphasis></simpara></listitem></varlistentry>
<varlistentry><term><parameter>properties</parameter> :</term>
<listitem><simpara>A list of properties that should be the only ones in the resulting variant structure. <emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A variant representing this item and it's children. <emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="DbusmenuMenuitemClass" role="struct">
<title>struct DbusmenuMenuitemClass</title>
<indexterm zone="DbusmenuMenuitemClass"><primary>DbusmenuMenuitemClass</primary></indexterm>
<programlisting>struct DbusmenuMenuitemClass {
GObjectClass parent_class;
/* Signals */
void (*property_changed) (gchar * property, GVariant * value);
void (*item_activated) (guint timestamp);
void (*child_added) (DbusmenuMenuitem * child, guint position);
void (*child_removed) (DbusmenuMenuitem * child);
void (*child_moved) (DbusmenuMenuitem * child, guint newpos, guint oldpos);
void (*realized) (void);
/* Virtual functions */
dbusmenu_menuitem_buildvariant_slot_t buildvariant;
void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, GVariant * variant, guint timestamp);
void (*send_about_to_show) (DbusmenuMenuitem * mi, void (*cb) (DbusmenuMenuitem * mi, gpointer user_data), gpointer cb_data);
void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data);
gboolean (*about_to_show) (void);
void (*event) (const gchar * name, GVariant * value, guint timestamp);
/*< Private >*/
void (*reserved1) (void);
void (*reserved2) (void);
void (*reserved3) (void);
void (*reserved4) (void);
void (*reserved5) (void);
};
</programlisting>
<para>
Functions and signals that every menuitem should know something
about.
</para><variablelist role="struct">
<varlistentry><term><link linkend="GObjectClass"><type>GObjectClass</type></link> <structfield id="DbusmenuMenuitemClass.parent-class">parent_class</structfield>;</term>
<listitem><simpara>Functions and signals from our parent</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.property-changed">property_changed</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-property-changed"><type>"property-changed"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.item-activated">item_activated</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-item-activated"><type>"item-activated"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.child-added">child_added</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-child-added"><type>"child-added"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.child-removed">child_removed</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-child-removed"><type>"child-removed"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.child-moved">child_moved</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-child-moved"><type>"child-moved"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.realized">realized</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-realized"><type>"realized"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="dbusmenu-menuitem-buildvariant-slot-t"><type>dbusmenu_menuitem_buildvariant_slot_t</type></link> <structfield id="DbusmenuMenuitemClass.buildvariant">buildvariant</structfield>;</term>
<listitem><simpara>Virtual function that appends the strings required to represent this menu item in the menu variant.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.handle-event">handle_event</structfield> ()</term>
<listitem><simpara>This function is to override how events are handled by subclasses. Look at <link linkend="dbusmenu-menuitem-handle-event"><type>dbusmenu_menuitem_handle_event</type></link> for lots of good information.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.show-to-user">show_to_user</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-show-to-user"><type>"show-to-user"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.about-to-show">about_to_show</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-about-to-show"><type>"about-to-show"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.event">event</structfield> ()</term>
<listitem><simpara>Slot for <link linkend="DbsumenuMenuitem-event"><type>"event"</type></link>.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved1">reserved1</structfield> ()</term>
<listitem><simpara>Reserved for future use.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved2">reserved2</structfield> ()</term>
<listitem><simpara>Reserved for future use.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved3">reserved3</structfield> ()</term>
<listitem><simpara>Reserved for future use.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved4">reserved4</structfield> ()</term>
<listitem><simpara>Reserved for future use.</simpara></listitem>
</varlistentry>
<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved5">reserved5</structfield> ()</term>
<listitem><simpara>Reserved for future use.</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-new" role="function">
<title>dbusmenu_menuitem_new ()</title>
<indexterm zone="dbusmenu-menuitem-new"><primary>dbusmenu_menuitem_new</primary></indexterm>
<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_new (<parameter><type>void</type></parameter>);</programlisting>
<para>
Create a new <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> with all default values.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A newly allocated <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link>.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-new-with-id" role="function">
<title>dbusmenu_menuitem_new_with_id ()</title>
<indexterm zone="dbusmenu-menuitem-new-with-id"><primary>dbusmenu_menuitem_new_with_id</primary></indexterm>
<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_new_with_id (<parameter><link linkend="gint"><type>gint</type></link> id</parameter>);</programlisting>
<para>
This creates a blank <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> with a specific ID.
</para><variablelist role="params">
<varlistentry><term><parameter>id</parameter> :</term>
<listitem><simpara>ID to use for this menuitem</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A newly allocated <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link>.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-get-id" role="function">
<title>dbusmenu_menuitem_get_id ()</title>
<indexterm zone="dbusmenu-menuitem-get-id"><primary>dbusmenu_menuitem_get_id</primary></indexterm>
<programlisting><link linkend="gint"><returnvalue>gint</returnvalue></link> dbusmenu_menuitem_get_id (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
Gets the unique ID for <parameter>mi</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to query.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The ID of the <parameter>mi</parameter>.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-get-children" role="function">
<title>dbusmenu_menuitem_get_children ()</title>
<indexterm zone="dbusmenu-menuitem-get-children"><primary>dbusmenu_menuitem_get_children</primary></indexterm>
<programlisting><link linkend="GList"><returnvalue>GList</returnvalue></link> * dbusmenu_menuitem_get_children (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
Returns simply the list of children that this menu item
has. The list is valid until another child related function
is called, where it might be changed.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to query.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A <link linkend="GList"><type>GList</type></link> of pointers to <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-take-children" role="function">
<title>dbusmenu_menuitem_take_children ()</title>
<indexterm zone="dbusmenu-menuitem-take-children"><primary>dbusmenu_menuitem_take_children</primary></indexterm>
<programlisting><link linkend="GList"><returnvalue>GList</returnvalue></link> * dbusmenu_menuitem_take_children (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
While the name sounds devious that's exactly what this function
does. It takes the list of children from the <parameter>mi</parameter> and clears the
internal list. The calling function is now in charge of the ref's
on the children it has taken. A lot of responsibility involved
in taking children.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenMenuitem"><type>DbusmenMenuitem</type></link> to take the children from.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A <link linkend="GList"><type>GList</type></link> of pointers to <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects. <emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>element-type</acronym> Dbusmenu.Menuitem]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-get-position" role="function">
<title>dbusmenu_menuitem_get_position ()</title>
<indexterm zone="dbusmenu-menuitem-get-position"><primary>dbusmenu_menuitem_get_position</primary></indexterm>
<programlisting><link linkend="guint"><returnvalue>guint</returnvalue></link> dbusmenu_menuitem_get_position (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);</programlisting>
<para>
This function returns the position of the menu item <parameter>mi</parameter>
in the children of <parameter>parent</parameter>. It will return zero if the
menu item can't be found.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to find the position of</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parent</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> who's children contain <parameter>mi</parameter></simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The position of <parameter>mi</parameter> in the children of <parameter>parent</parameter>.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-get-position-realized" role="function">
<title>dbusmenu_menuitem_get_position_realized ()</title>
<indexterm zone="dbusmenu-menuitem-get-position-realized"><primary>dbusmenu_menuitem_get_position_realized</primary></indexterm>
<programlisting><link linkend="guint"><returnvalue>guint</returnvalue></link> dbusmenu_menuitem_get_position_realized
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);</programlisting>
<para>
This function is very similar to <link linkend="dbusmenu-menuitem-get-position"><type>dbusmenu_menuitem_get_position</type></link>
except that it only counts in the children that have been realized.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to find the position of</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parent</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> who's children contain <parameter>mi</parameter></simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The position of <parameter>mi</parameter> in the realized children of <parameter>parent</parameter>.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-child-append" role="function">
<title>dbusmenu_menuitem_child_append ()</title>
<indexterm zone="dbusmenu-menuitem-child-append"><primary>dbusmenu_menuitem_child_append</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_append (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);</programlisting>
<para>
This function adds <parameter>child</parameter> to the list of children on <parameter>mi</parameter> at
the end of that list.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> which will become a new parent</simpara></listitem></varlistentry>
<varlistentry><term><parameter>child</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenMenuitem"><type>DbusmenMenuitem</type></link> that will be a child</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether the child has been added successfully.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-child-prepend" role="function">
<title>dbusmenu_menuitem_child_prepend ()</title>
<indexterm zone="dbusmenu-menuitem-child-prepend"><primary>dbusmenu_menuitem_child_prepend</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_prepend (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);</programlisting>
<para>
This function adds <parameter>child</parameter> to the list of children on <parameter>mi</parameter> at
the beginning of that list.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> which will become a new parent</simpara></listitem></varlistentry>
<varlistentry><term><parameter>child</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenMenuitem"><type>DbusmenMenuitem</type></link> that will be a child</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether the child has been added successfully.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-child-delete" role="function">
<title>dbusmenu_menuitem_child_delete ()</title>
<indexterm zone="dbusmenu-menuitem-child-delete"><primary>dbusmenu_menuitem_child_delete</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_delete (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);</programlisting>
<para>
This function removes <parameter>child</parameter> from the children list of <parameter>mi</parameter>. It does
not call <link linkend="g-object-unref"><type>g_object_unref</type></link> on <parameter>child</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> which has <parameter>child</parameter> as a child</simpara></listitem></varlistentry>
<varlistentry><term><parameter>child</parameter> :</term>
<listitem><simpara>The child <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that you want to no longer
be a child of <parameter>mi</parameter>.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>If we were able to delete <parameter>child</parameter>.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-child-add-position" role="function">
<title>dbusmenu_menuitem_child_add_position ()</title>
<indexterm zone="dbusmenu-menuitem-child-add-position"><primary>dbusmenu_menuitem_child_add_position</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_add_position
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting>
<para>
Puts <parameter>child</parameter> in the list of children for <parameter>mi</parameter> at the location
specified in <parameter>position</parameter>. If there is not enough entires available
then <parameter>child</parameter> will be placed at the end of the list.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that we're adding the child <parameter>child</parameter> to.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>child</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to make a child of <parameter>mi</parameter>.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter> :</term>
<listitem><simpara>Where in <parameter>mi</parameter> object's list of chidren <parameter>child</parameter> should be placed.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether <parameter>child</parameter> was added successfully.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-child-reorder" role="function">
<title>dbusmenu_menuitem_child_reorder ()</title>
<indexterm zone="dbusmenu-menuitem-child-reorder"><primary>dbusmenu_menuitem_child_reorder</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_reorder (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting>
<para>
This function moves a child on the list of children. It is
for a child that is already in the list, but simply needs a
new location.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that has children needing realignment</simpara></listitem></varlistentry>
<varlistentry><term><parameter>child</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that is a child needing to be moved</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter> :</term>
<listitem><simpara>The position in the list to place it in</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether the move was successful.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-child-find" role="function">
<title>dbusmenu_menuitem_child_find ()</title>
<indexterm zone="dbusmenu-menuitem-child-find"><primary>dbusmenu_menuitem_child_find</primary></indexterm>
<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_child_find (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gint"><type>gint</type></link> id</parameter>);</programlisting>
<para>
Search the children of <parameter>mi</parameter> to find one with the ID of <parameter>id</parameter>.
If it doesn't exist then we return <link linkend="NULL:CAPS"><type>NULL</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> who's children to look on</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter> :</term>
<listitem><simpara>The ID of the child that we're looking for.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The menu item with the ID <parameter>id</parameter> or <link linkend="NULL:CAPS"><type>NULL</type></link> if it
can't be found. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-find-id" role="function">
<title>dbusmenu_menuitem_find_id ()</title>
<indexterm zone="dbusmenu-menuitem-find-id"><primary>dbusmenu_menuitem_find_id</primary></indexterm>
<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_find_id (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gint"><type>gint</type></link> id</parameter>);</programlisting>
<para>
This function searchs the whole tree of children that
are attached to <parameter>mi</parameter>. This could be quite a few nodes, all
the way down the tree. It is a depth first search.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> at the top of the tree to search</simpara></listitem></varlistentry>
<varlistentry><term><parameter>id</parameter> :</term>
<listitem><simpara>ID of the <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to search for</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> with the ID of <parameter>id</parameter>
or <link linkend="NULL:CAPS"><type>NULL</type></link> if there isn't such a menu item in the tree
represented by <parameter>mi</parameter>. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-set" role="function">
<title>dbusmenu_menuitem_property_set ()</title>
<indexterm zone="dbusmenu-menuitem-property-set"><primary>dbusmenu_menuitem_property_set</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>);</programlisting>
<para>
Takes the pair of <parameter>property</parameter> and <parameter>value</parameter> and places them as a
property on <parameter>mi</parameter>. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal <link linkend="DbusmenuMenuitem-prop-changed"><type>"prop-changed"</type></link> will be
emitted by this function.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>Name of the property to set.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara>The value of the property.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A boolean representing if the property value was set.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-set-bool" role="function">
<title>dbusmenu_menuitem_property_set_bool ()</title>
<indexterm zone="dbusmenu-menuitem-property-set-bool"><primary>dbusmenu_menuitem_property_set_bool</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_bool (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter>const <link linkend="gboolean"><type>gboolean</type></link> value</parameter>);</programlisting>
<para>
Takes a boolean <parameter>value</parameter> and sets it on <parameter>property</parameter> as a
property on <parameter>mi</parameter>. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal <link linkend="DbusmenuMenuitem-prop-changed"><type>"prop-changed"</type></link> will be
emitted by this function.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>Name of the property to set.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara>The value of the property.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A boolean representing if the property value was set.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-set-int" role="function">
<title>dbusmenu_menuitem_property_set_int ()</title>
<indexterm zone="dbusmenu-menuitem-property-set-int"><primary>dbusmenu_menuitem_property_set_int</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_int (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter>const <link linkend="gint"><type>gint</type></link> value</parameter>);</programlisting>
<para>
Takes a boolean <parameter>value</parameter> and sets it on <parameter>property</parameter> as a
property on <parameter>mi</parameter>. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal <link linkend="DbusmenuMenuitem-prop-changed"><type>"prop-changed"</type></link> will be
emitted by this function.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>Name of the property to set.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara>The value of the property.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A boolean representing if the property value was set.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-set-variant" role="function">
<title>dbusmenu_menuitem_property_set_variant ()</title>
<indexterm zone="dbusmenu-menuitem-property-set-variant"><primary>dbusmenu_menuitem_property_set_variant</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_variant
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>,
<parameter><link linkend="GVariant"><type>GVariant</type></link> *value</parameter>);</programlisting>
<para>
Takes the pair of <parameter>property</parameter> and <parameter>value</parameter> and places them as a
property on <parameter>mi</parameter>. If a property already exists by that name,
then the value is set to the new value. If not, the property
is added. If the value is changed or the property was previously
unset then the signal <link linkend="DbusmenuMenuitem-prop-changed"><type>"prop-changed"</type></link> will be
emitted by this function.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>Name of the property to set.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter> :</term>
<listitem><simpara>The value of the property.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A boolean representing if the property value was set.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-get" role="function">
<title>dbusmenu_menuitem_property_get ()</title>
<indexterm zone="dbusmenu-menuitem-property-get"><primary>dbusmenu_menuitem_property_get</primary></indexterm>
<programlisting>const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> * dbusmenu_menuitem_property_get (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting>
<para>
Look up a property on <parameter>mi</parameter> and return the value of it if
it exits. <link linkend="NULL:CAPS"><type>NULL</type></link> will be returned if the property doesn't
exist.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to look for the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>The property to grab.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A string with the value of the property
that shouldn't be free'd. Or <link linkend="NULL:CAPS"><type>NULL</type></link> if the property
is not set or is not a string. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-get-bool" role="function">
<title>dbusmenu_menuitem_property_get_bool ()</title>
<indexterm zone="dbusmenu-menuitem-property-get-bool"><primary>dbusmenu_menuitem_property_get_bool</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_get_bool (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting>
<para>
Look up a property on <parameter>mi</parameter> and return the value of it if
it exits. Returns <link linkend="FALSE:CAPS"><type>FALSE</type></link> if the property doesn't exist.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to look for the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>The property to grab.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The value of the property or <link linkend="FALSE:CAPS"><type>FALSE</type></link>.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-get-int" role="function">
<title>dbusmenu_menuitem_property_get_int ()</title>
<indexterm zone="dbusmenu-menuitem-property-get-int"><primary>dbusmenu_menuitem_property_get_int</primary></indexterm>
<programlisting><link linkend="gint"><returnvalue>gint</returnvalue></link> dbusmenu_menuitem_property_get_int (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting>
<para>
Look up a property on <parameter>mi</parameter> and return the value of it if
it exits. Returns zero if the property doesn't exist.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to look for the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>The property to grab.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The value of the property or zero.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-get-variant" role="function">
<title>dbusmenu_menuitem_property_get_variant ()</title>
<indexterm zone="dbusmenu-menuitem-property-get-variant"><primary>dbusmenu_menuitem_property_get_variant</primary></indexterm>
<programlisting><link linkend="GVariant"><returnvalue>GVariant</returnvalue></link> * dbusmenu_menuitem_property_get_variant
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting>
<para>
Look up a property on <parameter>mi</parameter> and return the value of it if
it exits. <link linkend="NULL:CAPS"><type>NULL</type></link> will be returned if the property doesn't
exist.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to look for the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>The property to grab.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A GVariant for the property. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-exist" role="function">
<title>dbusmenu_menuitem_property_exist ()</title>
<indexterm zone="dbusmenu-menuitem-property-exist"><primary>dbusmenu_menuitem_property_exist</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_exist (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting>
<para>
Checkes to see if a particular property exists on <parameter>mi</parameter> and
returns <link linkend="TRUE:CAPS"><type>TRUE</type></link> if so.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to look for the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>The property to look for.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A boolean checking to see if the property is available</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-properties-list" role="function">
<title>dbusmenu_menuitem_properties_list ()</title>
<indexterm zone="dbusmenu-menuitem-properties-list"><primary>dbusmenu_menuitem_properties_list</primary></indexterm>
<programlisting><link linkend="GList"><returnvalue>GList</returnvalue></link> * dbusmenu_menuitem_properties_list (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
This functiong gets a list of the names of all the properties
that are set on this menu item. This data on the list is owned
by the menuitem but the list is not and should be freed using
<link linkend="g-list-free"><function>g_list_free()</function></link> when the calling function is done with it.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to list the properties on</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A list of strings or NULL if there are
none. <emphasis role="annotation">[<acronym>transfer container</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-properties-copy" role="function">
<title>dbusmenu_menuitem_properties_copy ()</title>
<indexterm zone="dbusmenu-menuitem-properties-copy"><primary>dbusmenu_menuitem_properties_copy</primary></indexterm>
<programlisting><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link> * dbusmenu_menuitem_properties_copy (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
This function takes the properties of a <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link>
and puts them into a <link linkend="GHashTable"><type>GHashTable</type></link> that is referenced by the
key of a string and has the value of a string. The hash
table may not have any entries if there aren't any or there
is an error in processing. It is the caller's responsibility
to destroy the created <link linkend="GHashTable"><type>GHashTable</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that we're interested in the properties of</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A brand new <link linkend="GHashTable"><type>GHashTable</type></link> that contains all of
theroperties that are on this <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> <parameter>mi</parameter>. <emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-property-remove" role="function">
<title>dbusmenu_menuitem_property_remove ()</title>
<indexterm zone="dbusmenu-menuitem-property-remove"><primary>dbusmenu_menuitem_property_remove</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_property_remove (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting>
<para>
Removes a property from the menuitem.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to remove the property on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property</parameter> :</term>
<listitem><simpara>The property to look for.</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-set-root" role="function">
<title>dbusmenu_menuitem_set_root ()</title>
<indexterm zone="dbusmenu-menuitem-set-root"><primary>dbusmenu_menuitem_set_root</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_set_root (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="gboolean"><type>gboolean</type></link> root</parameter>);</programlisting>
<para>
This function sets the internal value of whether this is a
root node or not.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set whether it's root</simpara></listitem></varlistentry>
<varlistentry><term><parameter>root</parameter> :</term>
<listitem><simpara>Whether <parameter>mi</parameter> is a root node or not</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-get-root" role="function">
<title>dbusmenu_menuitem_get_root ()</title>
<indexterm zone="dbusmenu-menuitem-get-root"><primary>dbusmenu_menuitem_get_root</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_get_root (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
This function returns the internal value of whether this is a
root node or not.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to see whether it's root</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara><link linkend="TRUE:CAPS"><type>TRUE</type></link> if this is a root node</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-foreach" role="function">
<title>dbusmenu_menuitem_foreach ()</title>
<indexterm zone="dbusmenu-menuitem-foreach"><primary>dbusmenu_menuitem_foreach</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_foreach (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="void"><type>void</type></link> (*func) (DbusmenuMenuitem * mi, gpointer data)</parameter>,
<parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting>
<para>
This calls the function <parameter>func</parameter> on this menu item and all
of the children of this item. And their children. And
their children. And... you get the point. It will get
called on the whole tree.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenItem"><type>DbusmenItem</type></link> to start from</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter> :</term>
<listitem><simpara>Function to call on every node in the tree</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter> :</term>
<listitem><simpara>User data to pass to the function. <emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-handle-event" role="function">
<title>dbusmenu_menuitem_handle_event ()</title>
<indexterm zone="dbusmenu-menuitem-handle-event"><primary>dbusmenu_menuitem_handle_event</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_handle_event (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
<parameter><link linkend="GVariant"><type>GVariant</type></link> *variant</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> timestamp</parameter>);</programlisting>
<para>
This function is called to create an event. It is likely
to be overrided by subclasses. The default menu item
will respond to the activate signal and do:
</para>
<para>
Emits the <link linkend="DbusmenuMenuitem-item-activate"><type>"item-activate"</type></link> signal on this
menu item. Called by server objects when they get the
appropriate DBus signals from the client.
</para>
<para>
If you subclass this function you should really think
about calling the parent function unless you have a good
reason not to.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to send the signal on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter> :</term>
<listitem><simpara>The name of the signal</simpara></listitem></varlistentry>
<varlistentry><term><parameter>variant</parameter> :</term>
<listitem><simpara>A value that could be set for the event</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timestamp</parameter> :</term>
<listitem><simpara>The timestamp of when the event happened</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-send-about-to-show" role="function">
<title>dbusmenu_menuitem_send_about_to_show ()</title>
<indexterm zone="dbusmenu-menuitem-send-about-to-show"><primary>dbusmenu_menuitem_send_about_to_show</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_send_about_to_show
(<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="void"><type>void</type></link> (*cb) (DbusmenuMenuitem * mi, gpointer user_data)</parameter>,
<parameter><link linkend="gpointer"><type>gpointer</type></link> cb_data</parameter>);</programlisting>
<para>
This function is used to send the even that the submenu
of this item is about to be shown. Callers to this event
should delay showing the menu until their callback is
called if possible.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to send the signal on.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb</parameter> :</term>
<listitem><simpara>Callback to call when the call has returned.</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cb_data</parameter> :</term>
<listitem><simpara>Data to pass to the callback. <emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-show-to-user" role="function">
<title>dbusmenu_menuitem_show_to_user ()</title>
<indexterm zone="dbusmenu-menuitem-show-to-user"><primary>dbusmenu_menuitem_show_to_user</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_show_to_user (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="guint"><type>guint</type></link> timestamp</parameter>);</programlisting>
<para>
Signals that this menu item should be shown to the user. If this is
server side the server will then take it and send it over the
bus.
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to show</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timestamp</parameter> :</term>
<listitem><simpara>The time that the user requested it to be shown</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-get-parent" role="function">
<title>dbusmenu_menuitem_get_parent ()</title>
<indexterm zone="dbusmenu-menuitem-get-parent"><primary>dbusmenu_menuitem_get_parent</primary></indexterm>
<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_get_parent (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
This function looks up the parent of <parameter>mi</parameter>
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> for which to inspect the parent</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The parent of this menu item. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-set-parent" role="function">
<title>dbusmenu_menuitem_set_parent ()</title>
<indexterm zone="dbusmenu-menuitem-set-parent"><primary>dbusmenu_menuitem_set_parent</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_set_parent (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>,
<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);</programlisting>
<para>
Sets the parent of <parameter>mi</parameter> to <parameter>parent</parameter>. If <parameter>mi</parameter> already
has a parent, then this call will fail. The parent will
be set automatically when using the usual methods to add a
child menuitem, so this function should not normally be
called directly
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> for which to set the parent</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parent</parameter> :</term>
<listitem><simpara>The new parent <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link></simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether the parent was set successfully</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="dbusmenu-menuitem-unparent" role="function">
<title>dbusmenu_menuitem_unparent ()</title>
<indexterm zone="dbusmenu-menuitem-unparent"><primary>dbusmenu_menuitem_unparent</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_unparent (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting>
<para>
Unparents the menu item <parameter>mi</parameter>. If <parameter>mi</parameter> doesn't have a
parent, then this call will fail. The menuitem will
be unparented automatically when using the usual methods
to delete a child menuitem, so this function should not
normally be called directly
</para><variablelist role="params">
<varlistentry><term><parameter>mi</parameter> :</term>
<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to unparent</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether the menu item was unparented successfully</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|