1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4
5use gtk_sys::{
6 GtkContainer, GtkContainerPrivate, GtkMenu, GtkMenuPrivate, GtkMenuShell, GtkMenuShellPrivate,
7 GtkStatusIconPrivate, GtkWidget, GtkWidgetPrivate,
8};
9use libloading::*;
10use once_cell::sync::Lazy;
11use std::os::raw::*;
12
13pub static LIB: Lazy<Library> = Lazy::new(|| {
14 let libayatana = unsafe { Library::new("libayatana-appindicator3.so.1") };
15 if let Ok(lib) = libayatana {
16 return lib;
17 }
18
19 let libappindicator = unsafe { Library::new("libappindicator3.so.1") };
20 if let Ok(lib) = libappindicator {
21 return lib;
22 }
23
24 #[cfg(feature = "backcompat")]
30 {
31 let libayatana_compat = unsafe { Library::new("libayatana-appindicator3.so") };
32 if let Ok(lib) = libayatana_compat {
33 return lib;
34 }
35
36 let libappindicator_compat = unsafe { Library::new("libappindicator3.so") };
37 if let Ok(lib) = libappindicator_compat {
38 return lib;
39 }
40
41 panic!(
42 "Failed to load ayatana-appindicator3 or appindicator3 dynamic library\n{}\n{}\n{}\n{}",
43 libayatana.unwrap_err(),
44 libappindicator.unwrap_err(),
45 libayatana_compat.unwrap_err(),
46 libappindicator_compat.unwrap_err(),
47 );
48 }
49
50 panic!(
51 "Failed to load ayatana-appindicator3 or appindicator3 dynamic library\n{}\n{}",
52 libayatana.unwrap_err(),
53 libappindicator.unwrap_err()
54 );
55});
56
57pub type guint32 = c_uint;
58pub type gint64 = c_long;
59pub type guint64 = c_ulong;
60pub type gsize = c_ulong;
61pub type gchar = c_char;
62pub type glong = c_long;
63pub type gint = c_int;
64pub type gboolean = gint;
65pub type gulong = c_ulong;
66pub type guint = c_uint;
67pub type gfloat = f32;
68pub type gdouble = f64;
69pub type gpointer = *mut c_void;
70#[repr(C)]
71#[derive(Debug, Copy, Clone)]
72pub struct _GData {
73 _unused: [u8; 0],
74}
75pub type GData = _GData;
76pub type GSList = _GSList;
77#[repr(C)]
78#[derive(Debug, Copy, Clone)]
79pub struct _GSList {
80 pub data: gpointer,
81 pub next: *mut GSList,
82}
83#[test]
84fn bindgen_test_layout__GSList() {
85 assert_eq!(
86 ::std::mem::size_of::<_GSList>(),
87 16usize,
88 concat!("Size of: ", stringify!(_GSList))
89 );
90 assert_eq!(
91 ::std::mem::align_of::<_GSList>(),
92 8usize,
93 concat!("Alignment of ", stringify!(_GSList))
94 );
95 assert_eq!(
96 unsafe { &(*(::std::ptr::null::<_GSList>())).data as *const _ as usize },
97 0usize,
98 concat!(
99 "Offset of field: ",
100 stringify!(_GSList),
101 "::",
102 stringify!(data)
103 )
104 );
105 assert_eq!(
106 unsafe { &(*(::std::ptr::null::<_GSList>())).next as *const _ as usize },
107 8usize,
108 concat!(
109 "Offset of field: ",
110 stringify!(_GSList),
111 "::",
112 stringify!(next)
113 )
114 );
115}
116pub type GType = gsize;
117pub type GValue = _GValue;
118pub type GTypeClass = _GTypeClass;
119pub type GTypeInstance = _GTypeInstance;
120#[doc = " GTypeClass:"]
121#[doc = ""]
122#[doc = " An opaque structure used as the base of all classes."]
123#[repr(C)]
124#[derive(Debug, Copy, Clone)]
125pub struct _GTypeClass {
126 pub g_type: GType,
127}
128#[test]
129fn bindgen_test_layout__GTypeClass() {
130 assert_eq!(
131 ::std::mem::size_of::<_GTypeClass>(),
132 8usize,
133 concat!("Size of: ", stringify!(_GTypeClass))
134 );
135 assert_eq!(
136 ::std::mem::align_of::<_GTypeClass>(),
137 8usize,
138 concat!("Alignment of ", stringify!(_GTypeClass))
139 );
140 assert_eq!(
141 unsafe { &(*(::std::ptr::null::<_GTypeClass>())).g_type as *const _ as usize },
142 0usize,
143 concat!(
144 "Offset of field: ",
145 stringify!(_GTypeClass),
146 "::",
147 stringify!(g_type)
148 )
149 );
150}
151#[doc = " GTypeInstance:"]
152#[doc = ""]
153#[doc = " An opaque structure used as the base of all type instances."]
154#[repr(C)]
155#[derive(Debug, Copy, Clone)]
156pub struct _GTypeInstance {
157 pub g_class: *mut GTypeClass,
158}
159#[test]
160fn bindgen_test_layout__GTypeInstance() {
161 assert_eq!(
162 ::std::mem::size_of::<_GTypeInstance>(),
163 8usize,
164 concat!("Size of: ", stringify!(_GTypeInstance))
165 );
166 assert_eq!(
167 ::std::mem::align_of::<_GTypeInstance>(),
168 8usize,
169 concat!("Alignment of ", stringify!(_GTypeInstance))
170 );
171 assert_eq!(
172 unsafe { &(*(::std::ptr::null::<_GTypeInstance>())).g_class as *const _ as usize },
173 0usize,
174 concat!(
175 "Offset of field: ",
176 stringify!(_GTypeInstance),
177 "::",
178 stringify!(g_class)
179 )
180 );
181}
182#[doc = " GValue:"]
183#[doc = ""]
184#[doc = " An opaque structure used to hold different types of values."]
185#[doc = " The data within the structure has protected scope: it is accessible only"]
186#[doc = " to functions within a #GTypeValueTable structure, or implementations of"]
187#[doc = " the g_value_*() API. That is, code portions which implement new fundamental"]
188#[doc = " types."]
189#[doc = " #GValue users cannot make any assumptions about how data is stored"]
190#[doc = " within the 2 element @data union, and the @g_type member should"]
191#[doc = " only be accessed through the G_VALUE_TYPE() macro."]
192#[repr(C)]
193#[derive(Copy, Clone)]
194pub struct _GValue {
195 pub g_type: GType,
196 pub data: [_GValue__bindgen_ty_1; 2usize],
197}
198#[repr(C)]
199#[derive(Copy, Clone)]
200pub union _GValue__bindgen_ty_1 {
201 pub v_int: gint,
202 pub v_uint: guint,
203 pub v_long: glong,
204 pub v_ulong: gulong,
205 pub v_int64: gint64,
206 pub v_uint64: guint64,
207 pub v_float: gfloat,
208 pub v_double: gdouble,
209 pub v_pointer: gpointer,
210 _bindgen_union_align: u64,
211}
212#[test]
213fn bindgen_test_layout__GValue__bindgen_ty_1() {
214 assert_eq!(
215 ::std::mem::size_of::<_GValue__bindgen_ty_1>(),
216 8usize,
217 concat!("Size of: ", stringify!(_GValue__bindgen_ty_1))
218 );
219 assert_eq!(
220 ::std::mem::align_of::<_GValue__bindgen_ty_1>(),
221 8usize,
222 concat!("Alignment of ", stringify!(_GValue__bindgen_ty_1))
223 );
224 assert_eq!(
225 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_int as *const _ as usize },
226 0usize,
227 concat!(
228 "Offset of field: ",
229 stringify!(_GValue__bindgen_ty_1),
230 "::",
231 stringify!(v_int)
232 )
233 );
234 assert_eq!(
235 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_uint as *const _ as usize },
236 0usize,
237 concat!(
238 "Offset of field: ",
239 stringify!(_GValue__bindgen_ty_1),
240 "::",
241 stringify!(v_uint)
242 )
243 );
244 assert_eq!(
245 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_long as *const _ as usize },
246 0usize,
247 concat!(
248 "Offset of field: ",
249 stringify!(_GValue__bindgen_ty_1),
250 "::",
251 stringify!(v_long)
252 )
253 );
254 assert_eq!(
255 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_ulong as *const _ as usize },
256 0usize,
257 concat!(
258 "Offset of field: ",
259 stringify!(_GValue__bindgen_ty_1),
260 "::",
261 stringify!(v_ulong)
262 )
263 );
264 assert_eq!(
265 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_int64 as *const _ as usize },
266 0usize,
267 concat!(
268 "Offset of field: ",
269 stringify!(_GValue__bindgen_ty_1),
270 "::",
271 stringify!(v_int64)
272 )
273 );
274 assert_eq!(
275 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_uint64 as *const _ as usize },
276 0usize,
277 concat!(
278 "Offset of field: ",
279 stringify!(_GValue__bindgen_ty_1),
280 "::",
281 stringify!(v_uint64)
282 )
283 );
284 assert_eq!(
285 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_float as *const _ as usize },
286 0usize,
287 concat!(
288 "Offset of field: ",
289 stringify!(_GValue__bindgen_ty_1),
290 "::",
291 stringify!(v_float)
292 )
293 );
294 assert_eq!(
295 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_double as *const _ as usize },
296 0usize,
297 concat!(
298 "Offset of field: ",
299 stringify!(_GValue__bindgen_ty_1),
300 "::",
301 stringify!(v_double)
302 )
303 );
304 assert_eq!(
305 unsafe { &(*(::std::ptr::null::<_GValue__bindgen_ty_1>())).v_pointer as *const _ as usize },
306 0usize,
307 concat!(
308 "Offset of field: ",
309 stringify!(_GValue__bindgen_ty_1),
310 "::",
311 stringify!(v_pointer)
312 )
313 );
314}
315#[test]
316fn bindgen_test_layout__GValue() {
317 assert_eq!(
318 ::std::mem::size_of::<_GValue>(),
319 24usize,
320 concat!("Size of: ", stringify!(_GValue))
321 );
322 assert_eq!(
323 ::std::mem::align_of::<_GValue>(),
324 8usize,
325 concat!("Alignment of ", stringify!(_GValue))
326 );
327 assert_eq!(
328 unsafe { &(*(::std::ptr::null::<_GValue>())).g_type as *const _ as usize },
329 0usize,
330 concat!(
331 "Offset of field: ",
332 stringify!(_GValue),
333 "::",
334 stringify!(g_type)
335 )
336 );
337 assert_eq!(
338 unsafe { &(*(::std::ptr::null::<_GValue>())).data as *const _ as usize },
339 8usize,
340 concat!(
341 "Offset of field: ",
342 stringify!(_GValue),
343 "::",
344 stringify!(data)
345 )
346 );
347}
348pub const GParamFlags_G_PARAM_READABLE: GParamFlags = 1;
349pub const GParamFlags_G_PARAM_WRITABLE: GParamFlags = 2;
350pub const GParamFlags_G_PARAM_READWRITE: GParamFlags = 3;
351pub const GParamFlags_G_PARAM_CONSTRUCT: GParamFlags = 4;
352pub const GParamFlags_G_PARAM_CONSTRUCT_ONLY: GParamFlags = 8;
353pub const GParamFlags_G_PARAM_LAX_VALIDATION: GParamFlags = 16;
354pub const GParamFlags_G_PARAM_STATIC_NAME: GParamFlags = 32;
355pub const GParamFlags_G_PARAM_PRIVATE: GParamFlags = 32;
356pub const GParamFlags_G_PARAM_STATIC_NICK: GParamFlags = 64;
357pub const GParamFlags_G_PARAM_STATIC_BLURB: GParamFlags = 128;
358pub const GParamFlags_G_PARAM_EXPLICIT_NOTIFY: GParamFlags = 1073741824;
359pub const GParamFlags_G_PARAM_DEPRECATED: GParamFlags = -2147483648;
360#[doc = " GParamFlags:"]
361#[doc = " @G_PARAM_READABLE: the parameter is readable"]
362#[doc = " @G_PARAM_WRITABLE: the parameter is writable"]
363#[doc = " @G_PARAM_READWRITE: alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE"]
364#[doc = " @G_PARAM_CONSTRUCT: the parameter will be set upon object construction"]
365#[doc = " @G_PARAM_CONSTRUCT_ONLY: the parameter can only be set upon object construction"]
366#[doc = " @G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert())"]
367#[doc = " strict validation is not required"]
368#[doc = " @G_PARAM_STATIC_NAME: the string used as name when constructing the"]
369#[doc = " parameter is guaranteed to remain valid and"]
370#[doc = " unmodified for the lifetime of the parameter."]
371#[doc = " Since 2.8"]
372#[doc = " @G_PARAM_STATIC_NICK: the string used as nick when constructing the"]
373#[doc = " parameter is guaranteed to remain valid and"]
374#[doc = " unmmodified for the lifetime of the parameter."]
375#[doc = " Since 2.8"]
376#[doc = " @G_PARAM_STATIC_BLURB: the string used as blurb when constructing the"]
377#[doc = " parameter is guaranteed to remain valid and"]
378#[doc = " unmodified for the lifetime of the parameter."]
379#[doc = " Since 2.8"]
380#[doc = " @G_PARAM_EXPLICIT_NOTIFY: calls to g_object_set_property() for this"]
381#[doc = " property will not automatically result in a \"notify\" signal being"]
382#[doc = " emitted: the implementation must call g_object_notify() themselves"]
383#[doc = " in case the property actually changes. Since: 2.42."]
384#[doc = " @G_PARAM_PRIVATE: internal"]
385#[doc = " @G_PARAM_DEPRECATED: the parameter is deprecated and will be removed"]
386#[doc = " in a future version. A warning will be generated if it is used"]
387#[doc = " while running with G_ENABLE_DIAGNOSTIC=1."]
388#[doc = " Since 2.26"]
389#[doc = ""]
390#[doc = " Through the #GParamFlags flag values, certain aspects of parameters"]
391#[doc = " can be configured. See also #G_PARAM_STATIC_STRINGS."]
392pub type GParamFlags = i32;
393pub type GParamSpec = _GParamSpec;
394#[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)"]
395#[doc = " @g_type_instance: private #GTypeInstance portion"]
396#[doc = " @name: name of this parameter: always an interned string"]
397#[doc = " @flags: #GParamFlags flags for this parameter"]
398#[doc = " @value_type: the #GValue type for this parameter"]
399#[doc = " @owner_type: #GType type that uses (introduces) this parameter"]
400#[doc = ""]
401#[doc = " All other fields of the GParamSpec struct are private and"]
402#[doc = " should not be used directly."]
403#[repr(C)]
404#[derive(Debug, Copy, Clone)]
405pub struct _GParamSpec {
406 pub g_type_instance: GTypeInstance,
407 pub name: *const gchar,
408 pub flags: GParamFlags,
409 pub value_type: GType,
410 pub owner_type: GType,
411 pub _nick: *mut gchar,
412 pub _blurb: *mut gchar,
413 pub qdata: *mut GData,
414 pub ref_count: guint,
415 pub param_id: guint,
416}
417#[test]
418fn bindgen_test_layout__GParamSpec() {
419 assert_eq!(
420 ::std::mem::size_of::<_GParamSpec>(),
421 72usize,
422 concat!("Size of: ", stringify!(_GParamSpec))
423 );
424 assert_eq!(
425 ::std::mem::align_of::<_GParamSpec>(),
426 8usize,
427 concat!("Alignment of ", stringify!(_GParamSpec))
428 );
429 assert_eq!(
430 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).g_type_instance as *const _ as usize },
431 0usize,
432 concat!(
433 "Offset of field: ",
434 stringify!(_GParamSpec),
435 "::",
436 stringify!(g_type_instance)
437 )
438 );
439 assert_eq!(
440 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).name as *const _ as usize },
441 8usize,
442 concat!(
443 "Offset of field: ",
444 stringify!(_GParamSpec),
445 "::",
446 stringify!(name)
447 )
448 );
449 assert_eq!(
450 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).flags as *const _ as usize },
451 16usize,
452 concat!(
453 "Offset of field: ",
454 stringify!(_GParamSpec),
455 "::",
456 stringify!(flags)
457 )
458 );
459 assert_eq!(
460 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).value_type as *const _ as usize },
461 24usize,
462 concat!(
463 "Offset of field: ",
464 stringify!(_GParamSpec),
465 "::",
466 stringify!(value_type)
467 )
468 );
469 assert_eq!(
470 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).owner_type as *const _ as usize },
471 32usize,
472 concat!(
473 "Offset of field: ",
474 stringify!(_GParamSpec),
475 "::",
476 stringify!(owner_type)
477 )
478 );
479 assert_eq!(
480 unsafe { &(*(::std::ptr::null::<_GParamSpec>()))._nick as *const _ as usize },
481 40usize,
482 concat!(
483 "Offset of field: ",
484 stringify!(_GParamSpec),
485 "::",
486 stringify!(_nick)
487 )
488 );
489 assert_eq!(
490 unsafe { &(*(::std::ptr::null::<_GParamSpec>()))._blurb as *const _ as usize },
491 48usize,
492 concat!(
493 "Offset of field: ",
494 stringify!(_GParamSpec),
495 "::",
496 stringify!(_blurb)
497 )
498 );
499 assert_eq!(
500 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).qdata as *const _ as usize },
501 56usize,
502 concat!(
503 "Offset of field: ",
504 stringify!(_GParamSpec),
505 "::",
506 stringify!(qdata)
507 )
508 );
509 assert_eq!(
510 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).ref_count as *const _ as usize },
511 64usize,
512 concat!(
513 "Offset of field: ",
514 stringify!(_GParamSpec),
515 "::",
516 stringify!(ref_count)
517 )
518 );
519 assert_eq!(
520 unsafe { &(*(::std::ptr::null::<_GParamSpec>())).param_id as *const _ as usize },
521 68usize,
522 concat!(
523 "Offset of field: ",
524 stringify!(_GParamSpec),
525 "::",
526 stringify!(param_id)
527 )
528 );
529}
530pub type GObject = _GObject;
531pub type GInitiallyUnowned = _GObject;
532#[doc = " GObject:"]
533#[doc = ""]
534#[doc = " All the fields in the GObject structure are private"]
535#[doc = " to the #GObject implementation and should never be accessed directly."]
536#[repr(C)]
537#[derive(Debug, Copy, Clone)]
538pub struct _GObject {
539 pub g_type_instance: GTypeInstance,
540 pub ref_count: guint,
541 pub qdata: *mut GData,
542}
543#[test]
544fn bindgen_test_layout__GObject() {
545 assert_eq!(
546 ::std::mem::size_of::<_GObject>(),
547 24usize,
548 concat!("Size of: ", stringify!(_GObject))
549 );
550 assert_eq!(
551 ::std::mem::align_of::<_GObject>(),
552 8usize,
553 concat!("Alignment of ", stringify!(_GObject))
554 );
555 assert_eq!(
556 unsafe { &(*(::std::ptr::null::<_GObject>())).g_type_instance as *const _ as usize },
557 0usize,
558 concat!(
559 "Offset of field: ",
560 stringify!(_GObject),
561 "::",
562 stringify!(g_type_instance)
563 )
564 );
565 assert_eq!(
566 unsafe { &(*(::std::ptr::null::<_GObject>())).ref_count as *const _ as usize },
567 8usize,
568 concat!(
569 "Offset of field: ",
570 stringify!(_GObject),
571 "::",
572 stringify!(ref_count)
573 )
574 );
575 assert_eq!(
576 unsafe { &(*(::std::ptr::null::<_GObject>())).qdata as *const _ as usize },
577 16usize,
578 concat!(
579 "Offset of field: ",
580 stringify!(_GObject),
581 "::",
582 stringify!(qdata)
583 )
584 );
585}
586pub const GdkScrollDirection_GDK_SCROLL_UP: GdkScrollDirection = 0;
587pub const GdkScrollDirection_GDK_SCROLL_DOWN: GdkScrollDirection = 1;
588pub const GdkScrollDirection_GDK_SCROLL_LEFT: GdkScrollDirection = 2;
589pub const GdkScrollDirection_GDK_SCROLL_RIGHT: GdkScrollDirection = 3;
590pub const GdkScrollDirection_GDK_SCROLL_SMOOTH: GdkScrollDirection = 4;
591#[doc = " GdkScrollDirection:"]
592#[doc = " @GDK_SCROLL_UP: the window is scrolled up."]
593#[doc = " @GDK_SCROLL_DOWN: the window is scrolled down."]
594#[doc = " @GDK_SCROLL_LEFT: the window is scrolled to the left."]
595#[doc = " @GDK_SCROLL_RIGHT: the window is scrolled to the right."]
596#[doc = " @GDK_SCROLL_SMOOTH: the scrolling is determined by the delta values"]
597#[doc = " in #GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4"]
598#[doc = ""]
599#[doc = " Specifies the direction for #GdkEventScroll."]
600pub type GdkScrollDirection = u32;
601#[repr(C)]
602#[derive(Debug, Copy, Clone)]
603pub struct _GtkWidgetPrivate {
604 _unused: [u8; 0],
605}
606#[repr(C)]
607#[derive(Debug, Copy, Clone)]
608pub struct _GtkWidget {
609 pub parent_instance: GInitiallyUnowned,
610 pub priv_: *mut GtkWidgetPrivate,
611}
612#[test]
613fn bindgen_test_layout__GtkWidget() {
614 assert_eq!(
615 ::std::mem::size_of::<_GtkWidget>(),
616 32usize,
617 concat!("Size of: ", stringify!(_GtkWidget))
618 );
619 assert_eq!(
620 ::std::mem::align_of::<_GtkWidget>(),
621 8usize,
622 concat!("Alignment of ", stringify!(_GtkWidget))
623 );
624 assert_eq!(
625 unsafe { &(*(::std::ptr::null::<_GtkWidget>())).parent_instance as *const _ as usize },
626 0usize,
627 concat!(
628 "Offset of field: ",
629 stringify!(_GtkWidget),
630 "::",
631 stringify!(parent_instance)
632 )
633 );
634 assert_eq!(
635 unsafe { &(*(::std::ptr::null::<_GtkWidget>())).priv_ as *const _ as usize },
636 24usize,
637 concat!(
638 "Offset of field: ",
639 stringify!(_GtkWidget),
640 "::",
641 stringify!(priv_)
642 )
643 );
644}
645#[repr(C)]
646#[derive(Debug, Copy, Clone)]
647pub struct _GtkContainerPrivate {
648 _unused: [u8; 0],
649}
650#[repr(C)]
651pub struct _GtkContainer {
652 pub widget: GtkWidget,
653 pub priv_: *mut GtkContainerPrivate,
654}
655#[test]
656fn bindgen_test_layout__GtkContainer() {
657 assert_eq!(
658 ::std::mem::size_of::<_GtkContainer>(),
659 40usize,
660 concat!("Size of: ", stringify!(_GtkContainer))
661 );
662 assert_eq!(
663 ::std::mem::align_of::<_GtkContainer>(),
664 8usize,
665 concat!("Alignment of ", stringify!(_GtkContainer))
666 );
667 assert_eq!(
668 unsafe { &(*(::std::ptr::null::<_GtkContainer>())).widget as *const _ as usize },
669 0usize,
670 concat!(
671 "Offset of field: ",
672 stringify!(_GtkContainer),
673 "::",
674 stringify!(widget)
675 )
676 );
677 assert_eq!(
678 unsafe { &(*(::std::ptr::null::<_GtkContainer>())).priv_ as *const _ as usize },
679 32usize,
680 concat!(
681 "Offset of field: ",
682 stringify!(_GtkContainer),
683 "::",
684 stringify!(priv_)
685 )
686 );
687}
688#[repr(C)]
689#[derive(Debug, Copy, Clone)]
690pub struct _GtkMenuShellPrivate {
691 _unused: [u8; 0],
692}
693#[repr(C)]
694pub struct _GtkMenuShell {
695 pub container: GtkContainer,
696 pub priv_: *mut GtkMenuShellPrivate,
697}
698#[test]
699fn bindgen_test_layout__GtkMenuShell() {
700 assert_eq!(
701 ::std::mem::size_of::<_GtkMenuShell>(),
702 48usize,
703 concat!("Size of: ", stringify!(_GtkMenuShell))
704 );
705 assert_eq!(
706 ::std::mem::align_of::<_GtkMenuShell>(),
707 8usize,
708 concat!("Alignment of ", stringify!(_GtkMenuShell))
709 );
710 assert_eq!(
711 unsafe { &(*(::std::ptr::null::<_GtkMenuShell>())).container as *const _ as usize },
712 0usize,
713 concat!(
714 "Offset of field: ",
715 stringify!(_GtkMenuShell),
716 "::",
717 stringify!(container)
718 )
719 );
720 assert_eq!(
721 unsafe { &(*(::std::ptr::null::<_GtkMenuShell>())).priv_ as *const _ as usize },
722 40usize,
723 concat!(
724 "Offset of field: ",
725 stringify!(_GtkMenuShell),
726 "::",
727 stringify!(priv_)
728 )
729 );
730}
731#[repr(C)]
732#[derive(Debug, Copy, Clone)]
733pub struct _GtkMenuPrivate {
734 _unused: [u8; 0],
735}
736#[repr(C)]
737pub struct _GtkMenu {
738 pub menu_shell: GtkMenuShell,
739 pub priv_: *mut GtkMenuPrivate,
740}
741#[test]
742fn bindgen_test_layout__GtkMenu() {
743 assert_eq!(
744 ::std::mem::size_of::<_GtkMenu>(),
745 56usize,
746 concat!("Size of: ", stringify!(_GtkMenu))
747 );
748 assert_eq!(
749 ::std::mem::align_of::<_GtkMenu>(),
750 8usize,
751 concat!("Alignment of ", stringify!(_GtkMenu))
752 );
753 assert_eq!(
754 unsafe { &(*(::std::ptr::null::<_GtkMenu>())).menu_shell as *const _ as usize },
755 0usize,
756 concat!(
757 "Offset of field: ",
758 stringify!(_GtkMenu),
759 "::",
760 stringify!(menu_shell)
761 )
762 );
763 assert_eq!(
764 unsafe { &(*(::std::ptr::null::<_GtkMenu>())).priv_ as *const _ as usize },
765 48usize,
766 concat!(
767 "Offset of field: ",
768 stringify!(_GtkMenu),
769 "::",
770 stringify!(priv_)
771 )
772 );
773}
774#[repr(C)]
775#[derive(Debug, Copy, Clone)]
776pub struct _GtkStatusIconPrivate {
777 _unused: [u8; 0],
778}
779#[repr(C)]
780#[derive(Debug, Copy, Clone)]
781pub struct _GtkStatusIcon {
782 pub parent_instance: GObject,
783 pub priv_: *mut GtkStatusIconPrivate,
784}
785#[test]
786fn bindgen_test_layout__GtkStatusIcon() {
787 assert_eq!(
788 ::std::mem::size_of::<_GtkStatusIcon>(),
789 32usize,
790 concat!("Size of: ", stringify!(_GtkStatusIcon))
791 );
792 assert_eq!(
793 ::std::mem::align_of::<_GtkStatusIcon>(),
794 8usize,
795 concat!("Alignment of ", stringify!(_GtkStatusIcon))
796 );
797 assert_eq!(
798 unsafe { &(*(::std::ptr::null::<_GtkStatusIcon>())).parent_instance as *const _ as usize },
799 0usize,
800 concat!(
801 "Offset of field: ",
802 stringify!(_GtkStatusIcon),
803 "::",
804 stringify!(parent_instance)
805 )
806 );
807 assert_eq!(
808 unsafe { &(*(::std::ptr::null::<_GtkStatusIcon>())).priv_ as *const _ as usize },
809 24usize,
810 concat!(
811 "Offset of field: ",
812 stringify!(_GtkStatusIcon),
813 "::",
814 stringify!(priv_)
815 )
816 );
817}
818pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_APPLICATION_STATUS: AppIndicatorCategory = 0;
819pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_COMMUNICATIONS: AppIndicatorCategory = 1;
820pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_SYSTEM_SERVICES: AppIndicatorCategory = 2;
821pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_HARDWARE: AppIndicatorCategory = 3;
822pub const AppIndicatorCategory_APP_INDICATOR_CATEGORY_OTHER: AppIndicatorCategory = 4;
823#[doc = " AppIndicatorCategory:"]
824#[doc = " @APP_INDICATOR_CATEGORY_APPLICATION_STATUS: The indicator is used to display the status of the application."]
825#[doc = " @APP_INDICATOR_CATEGORY_COMMUNICATIONS: The application is used for communication with other people."]
826#[doc = " @APP_INDICATOR_CATEGORY_SYSTEM_SERVICES: A system indicator relating to something in the user's system."]
827#[doc = " @APP_INDICATOR_CATEGORY_HARDWARE: An indicator relating to the user's hardware."]
828#[doc = " @APP_INDICATOR_CATEGORY_OTHER: Something not defined in this enum, please don't use unless you really need it."]
829#[doc = ""]
830#[doc = " The category provides grouping for the indicators so that"]
831#[doc = " users can find indicators that are similar together."]
832pub type AppIndicatorCategory = u32;
833pub const AppIndicatorStatus_APP_INDICATOR_STATUS_PASSIVE: AppIndicatorStatus = 0;
834pub const AppIndicatorStatus_APP_INDICATOR_STATUS_ACTIVE: AppIndicatorStatus = 1;
835pub const AppIndicatorStatus_APP_INDICATOR_STATUS_ATTENTION: AppIndicatorStatus = 2;
836#[doc = " AppIndicatorStatus:"]
837#[doc = " @APP_INDICATOR_STATUS_PASSIVE: The indicator should not be shown to the user."]
838#[doc = " @APP_INDICATOR_STATUS_ACTIVE: The indicator should be shown in it's default state."]
839#[doc = " @APP_INDICATOR_STATUS_ATTENTION: The indicator should show it's attention icon."]
840#[doc = ""]
841#[doc = " These are the states that the indicator can be on in"]
842#[doc = " the user's panel. The indicator by default starts"]
843#[doc = " in the state @APP_INDICATOR_STATUS_PASSIVE and can be"]
844#[doc = " shown by setting it to @APP_INDICATOR_STATUS_ACTIVE."]
845pub type AppIndicatorStatus = u32;
846pub type AppIndicator = _AppIndicator;
847#[repr(C)]
848#[derive(Debug, Copy, Clone)]
849pub struct _AppIndicatorPrivate {
850 _unused: [u8; 0],
851}
852pub type AppIndicatorPrivate = _AppIndicatorPrivate;
853#[doc = " AppIndicator:"]
854#[doc = ""]
855#[doc = " A application indicator represents the values that are needed to show a"]
856#[doc = " unique status in the panel for an application. In general, applications"]
857#[doc = " should try to fit in the other indicators that are available on the"]
858#[doc = " panel before using this. But, sometimes it is necissary."]
859#[doc = ""]
860#[doc = " Private fields"]
861#[doc = " @parent: Parent object."]
862#[doc = " @priv: Internal data."]
863#[repr(C)]
864#[derive(Debug, Copy, Clone)]
865pub struct _AppIndicator {
866 pub parent: GObject,
867 pub priv_: *mut AppIndicatorPrivate,
868}
869#[test]
870fn bindgen_test_layout__AppIndicator() {
871 assert_eq!(
872 ::std::mem::size_of::<_AppIndicator>(),
873 32usize,
874 concat!("Size of: ", stringify!(_AppIndicator))
875 );
876 assert_eq!(
877 ::std::mem::align_of::<_AppIndicator>(),
878 8usize,
879 concat!("Alignment of ", stringify!(_AppIndicator))
880 );
881 assert_eq!(
882 unsafe { &(*(::std::ptr::null::<_AppIndicator>())).parent as *const _ as usize },
883 0usize,
884 concat!(
885 "Offset of field: ",
886 stringify!(_AppIndicator),
887 "::",
888 stringify!(parent)
889 )
890 );
891 assert_eq!(
892 unsafe { &(*(::std::ptr::null::<_AppIndicator>())).priv_ as *const _ as usize },
893 24usize,
894 concat!(
895 "Offset of field: ",
896 stringify!(_AppIndicator),
897 "::",
898 stringify!(priv_)
899 )
900 );
901}
902
903pub unsafe fn app_indicator_get_type() -> GType {
904 let f = LIB
905 .get::<unsafe extern "C" fn() -> GType>(b"app_indicator_get_type\0")
906 .expect(
907 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
908 );
909 f()
910}
911
912pub unsafe fn app_indicator_new(
914 id: *const gchar,
915 icon_name: *const gchar,
916 category: AppIndicatorCategory,
917) -> *mut AppIndicator {
918 let f = LIB.get::<unsafe extern fn(*const gchar, *const gchar, AppIndicatorCategory) -> *mut AppIndicator>(b"app_indicator_new\0")
919 .expect("Can't get the extern function. This shouldn't happen unless the linked library is wrong.");
920 f(id, icon_name, category)
921}
922
923pub unsafe fn app_indicator_new_with_path(
924 id: *const gchar,
925 icon_name: *const gchar,
926 category: AppIndicatorCategory,
927 icon_theme_path: *const gchar,
928) -> *mut AppIndicator {
929 let f = LIB
930 .get::<unsafe extern "C" fn(
931 *const gchar,
932 *const gchar,
933 AppIndicatorCategory,
934 *const gchar,
935 ) -> *mut AppIndicator>(b"app_indicator_new_with_path\0")
936 .expect(
937 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
938 );
939 f(id, icon_name, category, icon_theme_path)
940}
941
942pub unsafe fn app_indicator_set_status(self_: *mut AppIndicator, status: AppIndicatorStatus) {
943 let f = LIB
944 .get::<unsafe extern "C" fn(*mut AppIndicator, AppIndicatorStatus)>(
945 b"app_indicator_set_status\0",
946 )
947 .expect(
948 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
949 );
950 f(self_, status)
951}
952
953pub unsafe fn app_indicator_set_attention_icon(self_: *mut AppIndicator, icon_name: *const gchar) {
954 let f = LIB
955 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(
956 b"app_indicator_set_attention_icon\0",
957 )
958 .expect(
959 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
960 );
961 f(self_, icon_name)
962}
963
964pub unsafe fn app_indicator_set_attention_icon_full(
965 self_: *mut AppIndicator,
966 icon_name: *const gchar,
967 icon_desc: *const gchar,
968) {
969 let f = LIB
970 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
971 b"app_indicator_set_attention_icon_full\0",
972 )
973 .expect(
974 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
975 );
976 f(self_, icon_name, icon_desc)
977}
978
979pub unsafe fn app_indicator_set_menu(self_: *mut AppIndicator, menu: *mut GtkMenu) {
980 let f = LIB
981 .get::<unsafe extern "C" fn(*mut AppIndicator, *mut GtkMenu)>(b"app_indicator_set_menu\0")
982 .expect(
983 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
984 );
985 f(self_, menu)
986}
987
988pub unsafe fn app_indicator_set_icon(self_: *mut AppIndicator, icon_name: *const gchar) {
989 let f = LIB
990 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(b"app_indicator_set_icon\0")
991 .expect(
992 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
993 );
994 f(self_, icon_name)
995}
996pub unsafe fn app_indicator_set_icon_full(
997 self_: *mut AppIndicator,
998 icon_name: *const gchar,
999 icon_desc: *const gchar,
1000) {
1001 let f = LIB
1002 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
1003 b"app_indicator_set_icon_full\0",
1004 )
1005 .expect(
1006 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1007 );
1008 f(self_, icon_name, icon_desc)
1009}
1010
1011pub unsafe fn app_indicator_set_label(
1012 self_: *mut AppIndicator,
1013 label: *const gchar,
1014 guide: *const gchar,
1015) {
1016 let f = LIB
1017 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
1018 b"app_indicator_set_label\0",
1019 )
1020 .expect(
1021 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1022 );
1023 f(self_, label, guide)
1024}
1025
1026pub unsafe fn app_indicator_set_icon_theme_path(
1027 self_: *mut AppIndicator,
1028 icon_theme_path: *const gchar,
1029) {
1030 let f = LIB
1031 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(
1032 b"app_indicator_set_icon_theme_path\0",
1033 )
1034 .expect(
1035 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1036 );
1037 f(self_, icon_theme_path)
1038}
1039
1040pub unsafe fn app_indicator_set_ordering_index(self_: *mut AppIndicator, ordering_index: guint32) {
1041 let f = LIB
1042 .get::<unsafe extern "C" fn(*mut AppIndicator, guint32)>(b"app_indicator_set_ordering_index\0")
1043 .expect(
1044 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1045 );
1046 f(self_, ordering_index)
1047}
1048
1049pub unsafe fn app_indicator_set_secondary_activate_target(
1050 self_: *mut AppIndicator,
1051 menuitem: *mut GtkWidget,
1052) {
1053 let f = LIB
1054 .get::<unsafe extern "C" fn(*mut AppIndicator, *mut GtkWidget)>(
1055 b"app_indicator_set_secondary_activate_target\0",
1056 )
1057 .expect(
1058 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1059 );
1060 f(self_, menuitem)
1061}
1062
1063pub unsafe fn app_indicator_set_title(self_: *mut AppIndicator, title: *const gchar) {
1064 let f = LIB
1065 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar)>(b"app_indicator_set_title\0")
1066 .expect(
1067 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1068 );
1069 f(self_, title)
1070}
1071
1072pub unsafe fn app_indicator_get_id(self_: *mut AppIndicator) -> *const gchar {
1073 let f = LIB
1074 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_id\0")
1075 .expect(
1076 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1077 );
1078 f(self_)
1079}
1080
1081pub unsafe fn app_indicator_get_category(self_: *mut AppIndicator) -> AppIndicatorCategory {
1082 let f = LIB
1083 .get::<unsafe extern "C" fn(*mut AppIndicator) -> AppIndicatorCategory>(
1084 b"app_indicator_get_category\0",
1085 )
1086 .expect(
1087 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1088 );
1089 f(self_)
1090}
1091
1092pub unsafe fn app_indicator_get_status(self_: *mut AppIndicator) -> AppIndicatorStatus {
1093 let f = LIB
1094 .get::<unsafe extern "C" fn(*mut AppIndicator) -> AppIndicatorStatus>(
1095 b"app_indicator_get_status\0",
1096 )
1097 .expect(
1098 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1099 );
1100 f(self_)
1101}
1102
1103pub unsafe fn app_indicator_get_icon(self_: *mut AppIndicator) -> *const gchar {
1104 let f = LIB
1105 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_icon\0")
1106 .expect(
1107 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1108 );
1109 f(self_)
1110}
1111
1112pub unsafe fn app_indicator_get_icon_desc(self_: *mut AppIndicator) -> *const gchar {
1113 let f = LIB
1114 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
1115 b"app_indicator_get_icon_desc\0",
1116 )
1117 .expect(
1118 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1119 );
1120 f(self_)
1121}
1122
1123pub unsafe fn app_indicator_get_icon_theme_path(self_: *mut AppIndicator) -> *const gchar {
1124 let f = LIB
1125 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
1126 b"app_indicator_get_icon_theme_path\0",
1127 )
1128 .expect(
1129 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1130 );
1131 f(self_)
1132}
1133
1134pub unsafe fn app_indicator_get_attention_icon(self_: *mut AppIndicator) -> *const gchar {
1135 let f = LIB
1136 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
1137 b"app_indicator_get_attention_icon\0",
1138 )
1139 .expect(
1140 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1141 );
1142 f(self_)
1143}
1144
1145pub unsafe fn app_indicator_get_attention_icon_desc(self_: *mut AppIndicator) -> *const gchar {
1146 let f = LIB
1147 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
1148 b"app_indicator_get_attention_icon_desc\0",
1149 )
1150 .expect(
1151 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1152 );
1153 f(self_)
1154}
1155
1156pub unsafe fn app_indicator_get_title(self_: *mut AppIndicator) -> *const gchar {
1157 let f = LIB
1158 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_title\0")
1159 .expect(
1160 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1161 );
1162 f(self_)
1163}
1164
1165pub unsafe fn app_indicator_get_menu(self_: *mut AppIndicator) -> *mut GtkMenu {
1166 let f = LIB
1167 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *mut GtkMenu>(b"app_indicator_get_menu\0")
1168 .expect(
1169 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1170 );
1171 f(self_)
1172}
1173
1174pub unsafe fn app_indicator_get_label(self_: *mut AppIndicator) -> *const gchar {
1175 let f = LIB
1176 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(b"app_indicator_get_label\0")
1177 .expect(
1178 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1179 );
1180 f(self_)
1181}
1182
1183pub unsafe fn app_indicator_get_label_guide(self_: *mut AppIndicator) -> *const gchar {
1184 let f = LIB
1185 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *const gchar>(
1186 b"app_indicator_get_label_guide\0",
1187 )
1188 .expect(
1189 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1190 );
1191 f(self_)
1192}
1193
1194pub unsafe fn app_indicator_get_ordering_index(self_: *mut AppIndicator) -> guint32 {
1195 let f = LIB
1196 .get::<unsafe extern "C" fn(*mut AppIndicator) -> guint32>(
1197 b"app_indicator_get_ordering_index\0",
1198 )
1199 .expect(
1200 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1201 );
1202 f(self_)
1203}
1204
1205pub unsafe fn app_indicator_get_secondary_activate_target(
1206 self_: *mut AppIndicator,
1207) -> *mut GtkWidget {
1208 let f = LIB
1209 .get::<unsafe extern "C" fn(*mut AppIndicator) -> *mut GtkWidget>(
1210 b"app_indicator_get_secondary_activate_target\0",
1211 )
1212 .expect(
1213 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1214 );
1215 f(self_)
1216}
1217
1218pub unsafe fn app_indicator_build_menu_from_desktop(
1219 self_: *mut AppIndicator,
1220 desktop_file: *const gchar,
1221 desktop_profile: *const gchar,
1222) {
1223 let f = LIB
1224 .get::<unsafe extern "C" fn(*mut AppIndicator, *const gchar, *const gchar)>(
1225 b"app_indicator_build_menu_from_desktop\0",
1226 )
1227 .expect(
1228 "Can't get the extern function. This shouldn't happen unless the linked library is wrong.",
1229 );
1230 f(self_, desktop_file, desktop_profile)
1231}