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
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

use gtk_sys::{
  GtkContainer, GtkContainerPrivate, GtkMenu, GtkMenuPrivate, GtkMenuShell, GtkMenuShellPrivate,
  GtkStatusIconPrivate, GtkWidget, GtkWidgetPrivate,
};
use libloading::*;
use once_cell::sync::Lazy;
use std::os::raw::*;

pub static LIB: Lazy<Library> = Lazy::new(|| {
  let libayatana = unsafe { Library::new("libayatana-appindicator3.so.1") };
  if let Ok(lib) = libayatana {
    return lib;
  }

  let libappindicator = unsafe { Library::new("libappindicator3.so.1") };
  if let Ok(lib) = libappindicator {
    return lib;
  }

  // Versions v0.7.1 and v0.7.2 relied exclusively on the .so files without .1 suffix.
  // This is 'bad' because by convention that signals we don't care about ABI compatibility.
  // However in weird cases (*ahum* Tauri bundled appimages) this .so file is the only one
  // available. Using this feature flag allows them some time to fix this problem and bundle
  // with the correct filename.
  #[cfg(feature = "backcompat")]
  {
    let libayatana_compat = unsafe { Library::new("libayatana-appindicator3.so") };
    if let Ok(lib) = libayatana_compat {
      return lib;
    }

    let libappindicator_compat = unsafe { Library::new("libappindicator3.so") };
    if let Ok(lib) = libappindicator_compat {
      return lib;
    }

    panic!(
      "Failed to load ayatana-appindicator3 or appindicator3 dynamic library\n{}\n{}\n{}\n{}",
      libayatana.unwrap_err(),
      libappindicator.unwrap_err(),
      libayatana_compat.unwrap_err(),
      libappindicator_compat.unwrap_err(),
    );
  }

  panic!(
    "Failed to load ayatana-appindicator3 or appindicator3 dynamic library\n{}\n{}",
    libayatana.unwrap_err(),
    libappindicator.unwrap_err()
  );
});

pub type guint32 = c_uint;
pub type gint64 = c_long;
pub type guint64 = c_ulong;
pub type gsize = c_ulong;
pub type gchar = c_char;
pub type glong = c_long;
pub type gint = c_int;
pub type gboolean = gint;
pub type gulong = c_ulong;
pub type guint = c_uint;
pub type gfloat = f32;
pub type gdouble = f64;
pub type gpointer = *mut c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GData {
  _unused: [u8; 0],
}
pub type GData = _GData;
pub type GSList = _GSList;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GSList {
  pub data: gpointer,
  pub next: *mut GSList,
}
#[test]
fn bindgen_test_layout__GSList() {
  assert_eq!(
    ::std::mem::size_of::<_GSList>(),
    16usize,
    concat!("Size of: ", stringify!(_GSList))
  );
  assert_eq!(
    ::std::mem::align_of::<_GSList>(),
    8usize,
    concat!("Alignment of ", stringify!(_GSList))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GSList>())).data as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GSList),
      "::",
      stringify!(data)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GSList>())).next as *const _ as usize },
    8usize,
    concat!(
      "Offset of field: ",
      stringify!(_GSList),
      "::",
      stringify!(next)
    )
  );
}
pub type GType = gsize;
pub type GValue = _GValue;
pub type GTypeClass = _GTypeClass;
pub type GTypeInstance = _GTypeInstance;
#[doc = " GTypeClass:"]
#[doc = ""]
#[doc = " An opaque structure used as the base of all classes."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GTypeClass {
  pub g_type: GType,
}
#[test]
fn bindgen_test_layout__GTypeClass() {
  assert_eq!(
    ::std::mem::size_of::<_GTypeClass>(),
    8usize,
    concat!("Size of: ", stringify!(_GTypeClass))
  );
  assert_eq!(
    ::std::mem::align_of::<_GTypeClass>(),
    8usize,
    concat!("Alignment of ", stringify!(_GTypeClass))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GTypeClass>())).g_type as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GTypeClass),
      "::",
      stringify!(g_type)
    )
  );
}
#[doc = " GTypeInstance:"]
#[doc = ""]
#[doc = " An opaque structure used as the base of all type instances."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GTypeInstance {
  pub g_class: *mut GTypeClass,
}
#[test]
fn bindgen_test_layout__GTypeInstance() {
  assert_eq!(
    ::std::mem::size_of::<_GTypeInstance>(),
    8usize,
    concat!("Size of: ", stringify!(_GTypeInstance))
  );
  assert_eq!(
    ::std::mem::align_of::<_GTypeInstance>(),
    8usize,
    concat!("Alignment of ", stringify!(_GTypeInstance))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GTypeInstance>())).g_class as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GTypeInstance),
      "::",
      stringify!(g_class)
    )
  );
}
#[doc = " GValue:"]
#[doc = ""]
#[doc = " An opaque structure used to hold different types of values."]
#[doc = " The data within the structure has protected scope: it is accessible only"]
#[doc = " to functions within a #GTypeValueTable structure, or implementations of"]
#[doc = " the g_value_*() API. That is, code portions which implement new fundamental"]
#[doc = " types."]
#[doc = " #GValue users cannot make any assumptions about how data is stored"]
#[doc = " within the 2 element @data union, and the @g_type member should"]
#[doc = " only be accessed through the G_VALUE_TYPE() macro."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _GValue {
  pub g_type: GType,
  pub data: [_GValue__bindgen_ty_1; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _GValue__bindgen_ty_1 {
  pub v_int: gint,
  pub v_uint: guint,
  pub v_long: glong,
  pub v_ulong: gulong,
  pub v_int64: gint64,
  pub v_uint64: guint64,
  pub v_float: gfloat,
  pub v_double: gdouble,
  pub v_pointer: gpointer,
  _bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout__GValue__bindgen_ty_1() {
  assert_eq!(
    ::std::mem::size_of::<_GValue__bindgen_ty_1>(),
    8usize,
    concat!("Size of: ", stringify!(_GValue__bindgen_ty_1))
  );
  assert_eq!(
    ::std::mem::align_of::<_GValue__bindgen_ty_1>(),
    8usize,
    concat!("Alignment of ", stringify!(_GValue__bindgen_ty_1))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_int as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_int)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_uint as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_uint)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_long as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_long)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_ulong as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_ulong)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_int64 as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_int64)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_uint64 as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_uint64)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_float as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_float)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_double as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_double)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_pointer as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue__bindgen_ty_1),
      "::",
      stringify!(v_pointer)
    )
  );
}
#[test]
fn bindgen_test_layout__GValue() {
  assert_eq!(
    ::std::mem::size_of::<_GValue>(),
    24usize,
    concat!("Size of: ", stringify!(_GValue))
  );
  assert_eq!(
    ::std::mem::align_of::<_GValue>(),
    8usize,
    concat!("Alignment of ", stringify!(_GValue))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue>())).g_type as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue),
      "::",
      stringify!(g_type)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GValue>())).data as *const _ as usize },
    8usize,
    concat!(
      "Offset of field: ",
      stringify!(_GValue),
      "::",
      stringify!(data)
    )
  );
}
pub const GParamFlags_G_PARAM_READABLE: GParamFlags = 1;
pub const GParamFlags_G_PARAM_WRITABLE: GParamFlags = 2;
pub const GParamFlags_G_PARAM_READWRITE: GParamFlags = 3;
pub const GParamFlags_G_PARAM_CONSTRUCT: GParamFlags = 4;
pub const GParamFlags_G_PARAM_CONSTRUCT_ONLY: GParamFlags = 8;
pub const GParamFlags_G_PARAM_LAX_VALIDATION: GParamFlags = 16;
pub const GParamFlags_G_PARAM_STATIC_NAME: GParamFlags = 32;
pub const GParamFlags_G_PARAM_PRIVATE: GParamFlags = 32;
pub const GParamFlags_G_PARAM_STATIC_NICK: GParamFlags = 64;
pub const GParamFlags_G_PARAM_STATIC_BLURB: GParamFlags = 128;
pub const GParamFlags_G_PARAM_EXPLICIT_NOTIFY: GParamFlags = 1073741824;
pub const GParamFlags_G_PARAM_DEPRECATED: GParamFlags = -2147483648;
#[doc = " GParamFlags:"]
#[doc = " @G_PARAM_READABLE: the parameter is readable"]
#[doc = " @G_PARAM_WRITABLE: the parameter is writable"]
#[doc = " @G_PARAM_READWRITE: alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE"]
#[doc = " @G_PARAM_CONSTRUCT: the parameter will be set upon object construction"]
#[doc = " @G_PARAM_CONSTRUCT_ONLY: the parameter can only be set upon object construction"]
#[doc = " @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert())"]
#[doc = "  strict validation is not required"]
#[doc = " @G_PARAM_STATIC_NAME: the string used as name when constructing the"]
#[doc = "  parameter is guaranteed to remain valid and"]
#[doc = "  unmodified for the lifetime of the parameter."]
#[doc = "  Since 2.8"]
#[doc = " @G_PARAM_STATIC_NICK: the string used as nick when constructing the"]
#[doc = "  parameter is guaranteed to remain valid and"]
#[doc = "  unmmodified for the lifetime of the parameter."]
#[doc = "  Since 2.8"]
#[doc = " @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the"]
#[doc = "  parameter is guaranteed to remain valid and"]
#[doc = "  unmodified for the lifetime of the parameter."]
#[doc = "  Since 2.8"]
#[doc = " @G_PARAM_EXPLICIT_NOTIFY: calls to g_object_set_property() for this"]
#[doc = "   property will not automatically result in a \"notify\" signal being"]
#[doc = "   emitted: the implementation must call g_object_notify() themselves"]
#[doc = "   in case the property actually changes.  Since: 2.42."]
#[doc = " @G_PARAM_PRIVATE: internal"]
#[doc = " @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed"]
#[doc = "  in a future version. A warning will be generated if it is used"]
#[doc = "  while running with G_ENABLE_DIAGNOSTIC=1."]
#[doc = "  Since 2.26"]
#[doc = ""]
#[doc = " Through the #GParamFlags flag values, certain aspects of parameters"]
#[doc = " can be configured. See also #G_PARAM_STATIC_STRINGS."]
pub type GParamFlags = i32;
pub type GParamSpec = _GParamSpec;
#[doc = " GParamSpec: (ref-func g_param_spec_ref_sink) (unref-func g_param_spec_uref) (set-value-func g_value_set_param) (get-value-func g_value_get_param)"]
#[doc = " @g_type_instance: private #GTypeInstance portion"]
#[doc = " @name: name of this parameter: always an interned string"]
#[doc = " @flags: #GParamFlags flags for this parameter"]
#[doc = " @value_type: the #GValue type for this parameter"]
#[doc = " @owner_type: #GType type that uses (introduces) this parameter"]
#[doc = ""]
#[doc = " All other fields of the GParamSpec struct are private and"]
#[doc = " should not be used directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GParamSpec {
  pub g_type_instance: GTypeInstance,
  pub name: *const gchar,
  pub flags: GParamFlags,
  pub value_type: GType,
  pub owner_type: GType,
  pub _nick: *mut gchar,
  pub _blurb: *mut gchar,
  pub qdata: *mut GData,
  pub ref_count: guint,
  pub param_id: guint,
}
#[test]
fn bindgen_test_layout__GParamSpec() {
  assert_eq!(
    ::std::mem::size_of::<_GParamSpec>(),
    72usize,
    concat!("Size of: ", stringify!(_GParamSpec))
  );
  assert_eq!(
    ::std::mem::align_of::<_GParamSpec>(),
    8usize,
    concat!("Alignment of ", stringify!(_GParamSpec))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).g_type_instance as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(g_type_instance)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).name as *const _ as usize },
    8usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(name)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).flags as *const _ as usize },
    16usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(flags)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).value_type as *const _ as usize },
    24usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(value_type)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).owner_type as *const _ as usize },
    32usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(owner_type)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>()))._nick as *const _ as usize },
    40usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(_nick)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>()))._blurb as *const _ as usize },
    48usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(_blurb)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).qdata as *const _ as usize },
    56usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(qdata)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).ref_count as *const _ as usize },
    64usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(ref_count)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GParamSpec>())).param_id as *const _ as usize },
    68usize,
    concat!(
      "Offset of field: ",
      stringify!(_GParamSpec),
      "::",
      stringify!(param_id)
    )
  );
}
pub type GObject = _GObject;
pub type GInitiallyUnowned = _GObject;
#[doc = " GObject:"]
#[doc = ""]
#[doc = " All the fields in the GObject structure are private"]
#[doc = " to the #GObject implementation and should never be accessed directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GObject {
  pub g_type_instance: GTypeInstance,
  pub ref_count: guint,
  pub qdata: *mut GData,
}
#[test]
fn bindgen_test_layout__GObject() {
  assert_eq!(
    ::std::mem::size_of::<_GObject>(),
    24usize,
    concat!("Size of: ", stringify!(_GObject))
  );
  assert_eq!(
    ::std::mem::align_of::<_GObject>(),
    8usize,
    concat!("Alignment of ", stringify!(_GObject))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GObject>())).g_type_instance as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GObject),
      "::",
      stringify!(g_type_instance)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GObject>())).ref_count as *const _ as usize },
    8usize,
    concat!(
      "Offset of field: ",
      stringify!(_GObject),
      "::",
      stringify!(ref_count)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GObject>())).qdata as *const _ as usize },
    16usize,
    concat!(
      "Offset of field: ",
      stringify!(_GObject),
      "::",
      stringify!(qdata)
    )
  );
}
pub const GdkScrollDirection_GDK_SCROLL_UP: GdkScrollDirection = 0;
pub const GdkScrollDirection_GDK_SCROLL_DOWN: GdkScrollDirection = 1;
pub const GdkScrollDirection_GDK_SCROLL_LEFT: GdkScrollDirection = 2;
pub const GdkScrollDirection_GDK_SCROLL_RIGHT: GdkScrollDirection = 3;
pub const GdkScrollDirection_GDK_SCROLL_SMOOTH: GdkScrollDirection = 4;
#[doc = " GdkScrollDirection:"]
#[doc = " @GDK_SCROLL_UP: the window is scrolled up."]
#[doc = " @GDK_SCROLL_DOWN: the window is scrolled down."]
#[doc = " @GDK_SCROLL_LEFT: the window is scrolled to the left."]
#[doc = " @GDK_SCROLL_RIGHT: the window is scrolled to the right."]
#[doc = " @GDK_SCROLL_SMOOTH: the scrolling is determined by the delta values"]
#[doc = "   in #GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4"]
#[doc = ""]
#[doc = " Specifies the direction for #GdkEventScroll."]
pub type GdkScrollDirection = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GtkWidgetPrivate {
  _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GtkWidget {
  pub parent_instance: GInitiallyUnowned,
  pub priv_: *mut GtkWidgetPrivate,
}
#[test]
fn bindgen_test_layout__GtkWidget() {
  assert_eq!(
    ::std::mem::size_of::<_GtkWidget>(),
    32usize,
    concat!("Size of: ", stringify!(_GtkWidget))
  );
  assert_eq!(
    ::std::mem::align_of::<_GtkWidget>(),
    8usize,
    concat!("Alignment of ", stringify!(_GtkWidget))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkWidget>())).parent_instance as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkWidget),
      "::",
      stringify!(parent_instance)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkWidget>())).priv_ as *const _ as usize },
    24usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkWidget),
      "::",
      stringify!(priv_)
    )
  );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GtkContainerPrivate {
  _unused: [u8; 0],
}
#[repr(C)]
pub struct _GtkContainer {
  pub widget: GtkWidget,
  pub priv_: *mut GtkContainerPrivate,
}
#[test]
fn bindgen_test_layout__GtkContainer() {
  assert_eq!(
    ::std::mem::size_of::<_GtkContainer>(),
    40usize,
    concat!("Size of: ", stringify!(_GtkContainer))
  );
  assert_eq!(
    ::std::mem::align_of::<_GtkContainer>(),
    8usize,
    concat!("Alignment of ", stringify!(_GtkContainer))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkContainer>())).widget as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkContainer),
      "::",
      stringify!(widget)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkContainer>())).priv_ as *const _ as usize },
    32usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkContainer),
      "::",
      stringify!(priv_)
    )
  );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GtkMenuShellPrivate {
  _unused: [u8; 0],
}
#[repr(C)]
pub struct _GtkMenuShell {
  pub container: GtkContainer,
  pub priv_: *mut GtkMenuShellPrivate,
}
#[test]
fn bindgen_test_layout__GtkMenuShell() {
  assert_eq!(
    ::std::mem::size_of::<_GtkMenuShell>(),
    48usize,
    concat!("Size of: ", stringify!(_GtkMenuShell))
  );
  assert_eq!(
    ::std::mem::align_of::<_GtkMenuShell>(),
    8usize,
    concat!("Alignment of ", stringify!(_GtkMenuShell))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkMenuShell>())).container as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkMenuShell),
      "::",
      stringify!(container)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkMenuShell>())).priv_ as *const _ as usize },
    40usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkMenuShell),
      "::",
      stringify!(priv_)
    )
  );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GtkMenuPrivate {
  _unused: [u8; 0],
}
#[repr(C)]
pub struct _GtkMenu {
  pub menu_shell: GtkMenuShell,
  pub priv_: *mut GtkMenuPrivate,
}
#[test]
fn bindgen_test_layout__GtkMenu() {
  assert_eq!(
    ::std::mem::size_of::<_GtkMenu>(),
    56usize,
    concat!("Size of: ", stringify!(_GtkMenu))
  );
  assert_eq!(
    ::std::mem::align_of::<_GtkMenu>(),
    8usize,
    concat!("Alignment of ", stringify!(_GtkMenu))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkMenu>())).menu_shell as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkMenu),
      "::",
      stringify!(menu_shell)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkMenu>())).priv_ as *const _ as usize },
    48usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkMenu),
      "::",
      stringify!(priv_)
    )
  );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GtkStatusIconPrivate {
  _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _GtkStatusIcon {
  pub parent_instance: GObject,
  pub priv_: *mut GtkStatusIconPrivate,
}
#[test]
fn bindgen_test_layout__GtkStatusIcon() {
  assert_eq!(
    ::std::mem::size_of::<_GtkStatusIcon>(),
    32usize,
    concat!("Size of: ", stringify!(_GtkStatusIcon))
  );
  assert_eq!(
    ::std::mem::align_of::<_GtkStatusIcon>(),
    8usize,
    concat!("Alignment of ", stringify!(_GtkStatusIcon))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkStatusIcon>())).parent_instance as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkStatusIcon),
      "::",
      stringify!(parent_instance)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_GtkStatusIcon>())).priv_ as *const _ as usize },
    24usize,
    concat!(
      "Offset of field: ",
      stringify!(_GtkStatusIcon),
      "::",
      stringify!(priv_)
    )
  );
}
pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_APPLICATION_STATUS: AppIndicatorCategory = 0;
pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_COMMUNICATIONS: AppIndicatorCategory = 1;
pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_SYSTEM_SERVICES: AppIndicatorCategory = 2;
pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_HARDWARE: AppIndicatorCategory = 3;
pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_OTHER: AppIndicatorCategory = 4;
#[doc = " AppIndicatorCategory:"]
#[doc = " @APP_INDICATOR_CATEGORY_APPLICATION_STATUS: The indicator is used to display the status of the application."]
#[doc = " @APP_INDICATOR_CATEGORY_COMMUNICATIONS: The application is used for communication with other people."]
#[doc = " @APP_INDICATOR_CATEGORY_SYSTEM_SERVICES: A system indicator relating to something in the user's system."]
#[doc = " @APP_INDICATOR_CATEGORY_HARDWARE: An indicator relating to the user's hardware."]
#[doc = " @APP_INDICATOR_CATEGORY_OTHER: Something not defined in this enum, please don't use unless you really need it."]
#[doc = ""]
#[doc = " The category provides grouping for the indicators so that"]
#[doc = " users can find indicators that are similar together."]
pub type AppIndicatorCategory = u32;
pub const AppIndicatorStatus_APP_INDICATOR_STATUS_PASSIVE: AppIndicatorStatus = 0;
pub const AppIndicatorStatus_APP_INDICATOR_STATUS_ACTIVE: AppIndicatorStatus = 1;
pub const AppIndicatorStatus_APP_INDICATOR_STATUS_ATTENTION: AppIndicatorStatus = 2;
#[doc = " AppIndicatorStatus:"]
#[doc = " @APP_INDICATOR_STATUS_PASSIVE: The indicator should not be shown to the user."]
#[doc = " @APP_INDICATOR_STATUS_ACTIVE: The indicator should be shown in it's default state."]
#[doc = " @APP_INDICATOR_STATUS_ATTENTION: The indicator should show it's attention icon."]
#[doc = ""]
#[doc = " These are the states that the indicator can be on in"]
#[doc = " the user's panel.  The indicator by default starts"]
#[doc = " in the state @APP_INDICATOR_STATUS_PASSIVE and can be"]
#[doc = " shown by setting it to @APP_INDICATOR_STATUS_ACTIVE."]
pub type AppIndicatorStatus = u32;
pub type AppIndicator = _AppIndicator;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _AppIndicatorPrivate {
  _unused: [u8; 0],
}
pub type AppIndicatorPrivate = _AppIndicatorPrivate;
#[doc = " AppIndicator:"]
#[doc = ""]
#[doc = " A application indicator represents the values that are needed to show a"]
#[doc = " unique status in the panel for an application.  In general, applications"]
#[doc = " should try to fit in the other indicators that are available on the"]
#[doc = " panel before using this.  But, sometimes it is necissary."]
#[doc = ""]
#[doc = "  Private fields"]
#[doc = " @parent: Parent object."]
#[doc = " @priv: Internal data."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _AppIndicator {
  pub parent: GObject,
  pub priv_: *mut AppIndicatorPrivate,
}
#[test]
fn bindgen_test_layout__AppIndicator() {
  assert_eq!(
    ::std::mem::size_of::<_AppIndicator>(),
    32usize,
    concat!("Size of: ", stringify!(_AppIndicator))
  );
  assert_eq!(
    ::std::mem::align_of::<_AppIndicator>(),
    8usize,
    concat!("Alignment of ", stringify!(_AppIndicator))
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_AppIndicator>())).parent as *const _ as usize },
    0usize,
    concat!(
      "Offset of field: ",
      stringify!(_AppIndicator),
      "::",
      stringify!(parent)
    )
  );
  assert_eq!(
    unsafe { &(*(::std::ptr::null::<_AppIndicator>())).priv_ as *const _ as usize },
    24usize,
    concat!(
      "Offset of field: ",
      stringify!(_AppIndicator),
      "::",
      stringify!(priv_)
    )
  );
}

pub unsafe fn app_indicator_get_type() -> GType {
  let f = LIB
    .get::<unsafe extern "C" fn() -> GType>(b"app_indicator_get_type\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f()
}

// TODO use OnceCell to store symbols.
pub unsafe fn app_indicator_new(
  id: *const gchar,
  icon_name: *const gchar,
  category: AppIndicatorCategory,
) -> *mut AppIndicator {
  let f = LIB.get::<unsafe extern fn(*const gchar, *const gchar, AppIndicatorCategory) -> *mut AppIndicator>(b"app_indicator_new\0")
        .expect("Can't get the extern function. This shouldn't happen unless the linked library is wrong.");
  f(id, icon_name, category)
}

pub unsafe fn app_indicator_new_with_path(
  id: *const gchar,
  icon_name: *const gchar,
  category: AppIndicatorCategory,
  icon_theme_path: *const gchar,
) -> *mut AppIndicator {
  let f = LIB
    .get::<unsafe extern "C" fn(
      *const gchar,
      *const gchar,
      AppIndicatorCategory,
      *const gchar,
    ) -> *mut AppIndicator>(b"app_indicator_new_with_path\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(id, icon_name, category, icon_theme_path)
}

pub unsafe fn app_indicator_set_status(self_: *mut AppIndicator, status: AppIndicatorStatus) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, AppIndicatorStatus)>(
      b"app_indicator_set_status\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, status)
}

pub unsafe fn app_indicator_set_attention_icon(self_: *mut AppIndicator, icon_name: *const gchar) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(
      b"app_indicator_set_attention_icon\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, icon_name)
}

pub unsafe fn app_indicator_set_attention_icon_full(
  self_: *mut AppIndicator,
  icon_name: *const gchar,
  icon_desc: *const gchar,
) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
      b"app_indicator_set_attention_icon_full\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, icon_name, icon_desc)
}

pub unsafe fn app_indicator_set_menu(self_: *mut AppIndicator, menu: *mut GtkMenu) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *mut GtkMenu)>(b"app_indicator_set_menu\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, menu)
}

pub unsafe fn app_indicator_set_icon(self_: *mut AppIndicator, icon_name: *const gchar) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(b"app_indicator_set_icon\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, icon_name)
}
pub unsafe fn app_indicator_set_icon_full(
  self_: *mut AppIndicator,
  icon_name: *const gchar,
  icon_desc: *const gchar,
) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
      b"app_indicator_set_icon_full\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, icon_name, icon_desc)
}

pub unsafe fn app_indicator_set_label(
  self_: *mut AppIndicator,
  label: *const gchar,
  guide: *const gchar,
) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
      b"app_indicator_set_label\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, label, guide)
}

pub unsafe fn app_indicator_set_icon_theme_path(
  self_: *mut AppIndicator,
  icon_theme_path: *const gchar,
) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(
      b"app_indicator_set_icon_theme_path\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, icon_theme_path)
}

pub unsafe fn app_indicator_set_ordering_index(self_: *mut AppIndicator, ordering_index: guint32) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, guint32)>(b"app_indicator_set_ordering_index\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, ordering_index)
}

pub unsafe fn app_indicator_set_secondary_activate_target(
  self_: *mut AppIndicator,
  menuitem: *mut GtkWidget,
) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *mut GtkWidget)>(
      b"app_indicator_set_secondary_activate_target\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, menuitem)
}

pub unsafe fn app_indicator_set_title(self_: *mut AppIndicator, title: *const gchar) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(b"app_indicator_set_title\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, title)
}

pub unsafe fn app_indicator_get_id(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_id\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_category(self_: *mut AppIndicator) -> AppIndicatorCategory {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> AppIndicatorCategory>(
      b"app_indicator_get_category\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_status(self_: *mut AppIndicator) -> AppIndicatorStatus {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> AppIndicatorStatus>(
      b"app_indicator_get_status\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_icon(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_icon\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_icon_desc(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
      b"app_indicator_get_icon_desc\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_icon_theme_path(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
      b"app_indicator_get_icon_theme_path\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_attention_icon(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
      b"app_indicator_get_attention_icon\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_attention_icon_desc(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
      b"app_indicator_get_attention_icon_desc\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_title(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_title\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_menu(self_: *mut AppIndicator) -> *mut GtkMenu {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *mut GtkMenu>(b"app_indicator_get_menu\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_label(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_label\0")
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_label_guide(self_: *mut AppIndicator) -> *const gchar {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
      b"app_indicator_get_label_guide\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_ordering_index(self_: *mut AppIndicator) -> guint32 {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> guint32>(
      b"app_indicator_get_ordering_index\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_get_secondary_activate_target(
  self_: *mut AppIndicator,
) -> *mut GtkWidget {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator) -> *mut GtkWidget>(
      b"app_indicator_get_secondary_activate_target\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_)
}

pub unsafe fn app_indicator_build_menu_from_desktop(
  self_: *mut AppIndicator,
  desktop_file: *const gchar,
  desktop_profile: *const gchar,
) {
  let f = LIB
    .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
      b"app_indicator_build_menu_from_desktop\0",
    )
    .expect(
      "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
    );
  f(self_, desktop_file, desktop_profile)
}