libxmlb_sys/
lib.rs

1// Generated by gir (https://github.com/gtk-rs/gir @ 8336b4ebe16f)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files.git @ 4d1189172a70)
4// DO NOT EDIT
5
6#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
7#![allow(
8    clippy::approx_constant,
9    clippy::type_complexity,
10    clippy::unreadable_literal,
11    clippy::upper_case_acronyms
12)]
13#![cfg_attr(docsrs, feature(doc_cfg))]
14
15use gio_sys as gio;
16use glib_sys as glib;
17use gobject_sys as gobject;
18
19#[allow(unused_imports)]
20use libc::{
21    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
22    intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
23};
24#[cfg(unix)]
25#[allow(unused_imports)]
26use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
27
28#[allow(unused_imports)]
29use glib::{gboolean, gconstpointer, gpointer, GType};
30
31// Enums
32pub type XbOpcodeKind = c_int;
33pub const XB_OPCODE_KIND_UNKNOWN: XbOpcodeKind = 0;
34pub const XB_OPCODE_KIND_INTEGER: XbOpcodeKind = 1;
35pub const XB_OPCODE_KIND_TEXT: XbOpcodeKind = 2;
36pub const XB_OPCODE_KIND_FUNCTION: XbOpcodeKind = 5;
37pub const XB_OPCODE_KIND_BOUND_UNSET: XbOpcodeKind = 8;
38pub const XB_OPCODE_KIND_BOUND_INTEGER: XbOpcodeKind = 9;
39pub const XB_OPCODE_KIND_BOUND_TEXT: XbOpcodeKind = 10;
40pub const XB_OPCODE_KIND_INDEXED_TEXT: XbOpcodeKind = 3;
41pub const XB_OPCODE_KIND_BOOLEAN: XbOpcodeKind = 17;
42pub const XB_OPCODE_KIND_BOUND_INDEXED_TEXT: XbOpcodeKind = 11;
43
44// Constants
45pub const XMLB_MAJOR_VERSION: c_int = 0;
46pub const XMLB_MICRO_VERSION: c_int = 19;
47pub const XMLB_MINOR_VERSION: c_int = 3;
48
49// Flags
50pub type XbBuilderCompileFlags = c_uint;
51pub const XB_BUILDER_COMPILE_FLAG_NONE: XbBuilderCompileFlags = 0;
52pub const XB_BUILDER_COMPILE_FLAG_NATIVE_LANGS: XbBuilderCompileFlags = 2;
53pub const XB_BUILDER_COMPILE_FLAG_IGNORE_INVALID: XbBuilderCompileFlags = 4;
54pub const XB_BUILDER_COMPILE_FLAG_SINGLE_LANG: XbBuilderCompileFlags = 8;
55pub const XB_BUILDER_COMPILE_FLAG_WATCH_BLOB: XbBuilderCompileFlags = 16;
56pub const XB_BUILDER_COMPILE_FLAG_IGNORE_GUID: XbBuilderCompileFlags = 32;
57pub const XB_BUILDER_COMPILE_FLAG_SINGLE_ROOT: XbBuilderCompileFlags = 64;
58
59pub type XbBuilderNodeFlags = c_uint;
60pub const XB_BUILDER_NODE_FLAG_NONE: XbBuilderNodeFlags = 0;
61pub const XB_BUILDER_NODE_FLAG_IGNORE: XbBuilderNodeFlags = 1;
62pub const XB_BUILDER_NODE_FLAG_LITERAL_TEXT: XbBuilderNodeFlags = 2;
63pub const XB_BUILDER_NODE_FLAG_HAS_TEXT: XbBuilderNodeFlags = 4;
64pub const XB_BUILDER_NODE_FLAG_HAS_TAIL: XbBuilderNodeFlags = 8;
65pub const XB_BUILDER_NODE_FLAG_TOKENIZE_TEXT: XbBuilderNodeFlags = 16;
66pub const XB_BUILDER_NODE_FLAG_STRIP_TEXT: XbBuilderNodeFlags = 32;
67
68pub type XbBuilderSourceFlags = c_uint;
69pub const XB_BUILDER_SOURCE_FLAG_NONE: XbBuilderSourceFlags = 0;
70pub const XB_BUILDER_SOURCE_FLAG_LITERAL_TEXT: XbBuilderSourceFlags = 1;
71pub const XB_BUILDER_SOURCE_FLAG_WATCH_FILE: XbBuilderSourceFlags = 2;
72pub const XB_BUILDER_SOURCE_FLAG_WATCH_DIRECTORY: XbBuilderSourceFlags = 4;
73
74pub type XbMachineDebugFlags = c_uint;
75pub const XB_MACHINE_DEBUG_FLAG_NONE: XbMachineDebugFlags = 0;
76pub const XB_MACHINE_DEBUG_FLAG_SHOW_STACK: XbMachineDebugFlags = 1;
77pub const XB_MACHINE_DEBUG_FLAG_SHOW_PARSING: XbMachineDebugFlags = 2;
78pub const XB_MACHINE_DEBUG_FLAG_SHOW_OPTIMIZER: XbMachineDebugFlags = 4;
79pub const XB_MACHINE_DEBUG_FLAG_SHOW_SLOW_PATH: XbMachineDebugFlags = 8;
80
81pub type XbMachineParseFlags = c_uint;
82pub const XB_MACHINE_PARSE_FLAG_NONE: XbMachineParseFlags = 0;
83pub const XB_MACHINE_PARSE_FLAG_OPTIMIZE: XbMachineParseFlags = 1;
84
85pub type XbNodeExportFlags = c_uint;
86pub const XB_NODE_EXPORT_FLAG_NONE: XbNodeExportFlags = 0;
87pub const XB_NODE_EXPORT_FLAG_ADD_HEADER: XbNodeExportFlags = 1;
88pub const XB_NODE_EXPORT_FLAG_FORMAT_MULTILINE: XbNodeExportFlags = 2;
89pub const XB_NODE_EXPORT_FLAG_FORMAT_INDENT: XbNodeExportFlags = 4;
90pub const XB_NODE_EXPORT_FLAG_INCLUDE_SIBLINGS: XbNodeExportFlags = 8;
91pub const XB_NODE_EXPORT_FLAG_ONLY_CHILDREN: XbNodeExportFlags = 16;
92pub const XB_NODE_EXPORT_FLAG_COLLAPSE_EMPTY: XbNodeExportFlags = 32;
93
94pub type XbOpcodeFlags = c_uint;
95pub const XB_OPCODE_FLAG_UNKNOWN: XbOpcodeFlags = 0;
96pub const XB_OPCODE_FLAG_INTEGER: XbOpcodeFlags = 1;
97pub const XB_OPCODE_FLAG_TEXT: XbOpcodeFlags = 2;
98pub const XB_OPCODE_FLAG_FUNCTION: XbOpcodeFlags = 4;
99pub const XB_OPCODE_FLAG_BOUND: XbOpcodeFlags = 8;
100pub const XB_OPCODE_FLAG_BOOLEAN: XbOpcodeFlags = 16;
101pub const XB_OPCODE_FLAG_TOKENIZED: XbOpcodeFlags = 32;
102
103pub type XbQueryFlags = c_uint;
104pub const XB_QUERY_FLAG_NONE: XbQueryFlags = 0;
105pub const XB_QUERY_FLAG_OPTIMIZE: XbQueryFlags = 1;
106pub const XB_QUERY_FLAG_USE_INDEXES: XbQueryFlags = 2;
107pub const XB_QUERY_FLAG_REVERSE: XbQueryFlags = 4;
108pub const XB_QUERY_FLAG_FORCE_NODE_CACHE: XbQueryFlags = 8;
109
110pub type XbSiloLoadFlags = c_uint;
111pub const XB_SILO_LOAD_FLAG_NONE: XbSiloLoadFlags = 0;
112pub const XB_SILO_LOAD_FLAG_NO_MAGIC: XbSiloLoadFlags = 1;
113pub const XB_SILO_LOAD_FLAG_WATCH_BLOB: XbSiloLoadFlags = 2;
114
115pub type XbSiloProfileFlags = c_uint;
116pub const XB_SILO_PROFILE_FLAG_NONE: XbSiloProfileFlags = 0;
117pub const XB_SILO_PROFILE_FLAG_DEBUG: XbSiloProfileFlags = 1;
118pub const XB_SILO_PROFILE_FLAG_APPEND: XbSiloProfileFlags = 2;
119pub const XB_SILO_PROFILE_FLAG_XPATH: XbSiloProfileFlags = 4;
120pub const XB_SILO_PROFILE_FLAG_OPTIMIZER: XbSiloProfileFlags = 8;
121
122// Callbacks
123pub type XbBuilderFixupFunc = Option<
124    unsafe extern "C" fn(
125        *mut XbBuilderFixup,
126        *mut XbBuilderNode,
127        gpointer,
128        *mut *mut glib::GError,
129    ) -> gboolean,
130>;
131pub type XbBuilderNodeSortFunc =
132    Option<unsafe extern "C" fn(*mut XbBuilderNode, *mut XbBuilderNode, gpointer) -> c_int>;
133pub type XbBuilderNodeTraverseFunc =
134    Option<unsafe extern "C" fn(*mut XbBuilderNode, gpointer) -> gboolean>;
135pub type XbBuilderSourceAdapterFunc = Option<
136    unsafe extern "C" fn(
137        *mut XbBuilderSource,
138        *mut XbBuilderSourceCtx,
139        gpointer,
140        *mut gio::GCancellable,
141        *mut *mut glib::GError,
142    ) -> *mut gio::GInputStream,
143>;
144pub type XbBuilderSourceNodeFunc = Option<
145    unsafe extern "C" fn(
146        *mut XbBuilderSource,
147        *mut XbBuilderNode,
148        gpointer,
149        *mut *mut glib::GError,
150    ) -> gboolean,
151>;
152pub type XbMachineMethodFunc = Option<
153    unsafe extern "C" fn(
154        *mut XbMachine,
155        *mut XbStack,
156        *mut gboolean,
157        gpointer,
158        gpointer,
159        *mut *mut glib::GError,
160    ) -> gboolean,
161>;
162pub type XbMachineOpcodeFixupFunc = Option<
163    unsafe extern "C" fn(
164        *mut XbMachine,
165        *mut XbStack,
166        gpointer,
167        *mut *mut glib::GError,
168    ) -> gboolean,
169>;
170pub type XbMachineTextHandlerFunc = Option<
171    unsafe extern "C" fn(
172        *mut XbMachine,
173        *mut XbStack,
174        *const c_char,
175        *mut gboolean,
176        gpointer,
177        *mut *mut glib::GError,
178    ) -> gboolean,
179>;
180pub type XbNodeTransmogrifyFunc = Option<unsafe extern "C" fn(*mut XbNode, gpointer) -> gboolean>;
181
182// Records
183#[derive(Copy, Clone)]
184#[repr(C)]
185pub struct XbBuilderClass {
186    pub parent_class: gobject::GObjectClass,
187    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
188    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
189    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
190    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
191    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
192    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
193    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
194}
195
196impl ::std::fmt::Debug for XbBuilderClass {
197    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
198        f.debug_struct(&format!("XbBuilderClass @ {self:p}"))
199            .field("parent_class", &self.parent_class)
200            .field("_xb_reserved1", &self._xb_reserved1)
201            .field("_xb_reserved2", &self._xb_reserved2)
202            .field("_xb_reserved3", &self._xb_reserved3)
203            .field("_xb_reserved4", &self._xb_reserved4)
204            .field("_xb_reserved5", &self._xb_reserved5)
205            .field("_xb_reserved6", &self._xb_reserved6)
206            .field("_xb_reserved7", &self._xb_reserved7)
207            .finish()
208    }
209}
210
211#[derive(Copy, Clone)]
212#[repr(C)]
213pub struct XbBuilderFixupClass {
214    pub parent_class: gobject::GObjectClass,
215    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
216    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
217    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
218    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
219    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
220    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
221    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
222}
223
224impl ::std::fmt::Debug for XbBuilderFixupClass {
225    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
226        f.debug_struct(&format!("XbBuilderFixupClass @ {self:p}"))
227            .field("parent_class", &self.parent_class)
228            .field("_xb_reserved1", &self._xb_reserved1)
229            .field("_xb_reserved2", &self._xb_reserved2)
230            .field("_xb_reserved3", &self._xb_reserved3)
231            .field("_xb_reserved4", &self._xb_reserved4)
232            .field("_xb_reserved5", &self._xb_reserved5)
233            .field("_xb_reserved6", &self._xb_reserved6)
234            .field("_xb_reserved7", &self._xb_reserved7)
235            .finish()
236    }
237}
238
239#[derive(Copy, Clone)]
240#[repr(C)]
241pub struct XbBuilderNodeClass {
242    pub parent_class: gobject::GObjectClass,
243    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
244    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
245    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
246    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
247    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
248    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
249    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
250}
251
252impl ::std::fmt::Debug for XbBuilderNodeClass {
253    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
254        f.debug_struct(&format!("XbBuilderNodeClass @ {self:p}"))
255            .field("parent_class", &self.parent_class)
256            .field("_xb_reserved1", &self._xb_reserved1)
257            .field("_xb_reserved2", &self._xb_reserved2)
258            .field("_xb_reserved3", &self._xb_reserved3)
259            .field("_xb_reserved4", &self._xb_reserved4)
260            .field("_xb_reserved5", &self._xb_reserved5)
261            .field("_xb_reserved6", &self._xb_reserved6)
262            .field("_xb_reserved7", &self._xb_reserved7)
263            .finish()
264    }
265}
266
267#[derive(Copy, Clone)]
268#[repr(C)]
269pub struct XbBuilderSourceClass {
270    pub parent_class: gobject::GObjectClass,
271    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
272    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
273    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
274    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
275    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
276    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
277    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
278}
279
280impl ::std::fmt::Debug for XbBuilderSourceClass {
281    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
282        f.debug_struct(&format!("XbBuilderSourceClass @ {self:p}"))
283            .field("parent_class", &self.parent_class)
284            .field("_xb_reserved1", &self._xb_reserved1)
285            .field("_xb_reserved2", &self._xb_reserved2)
286            .field("_xb_reserved3", &self._xb_reserved3)
287            .field("_xb_reserved4", &self._xb_reserved4)
288            .field("_xb_reserved5", &self._xb_reserved5)
289            .field("_xb_reserved6", &self._xb_reserved6)
290            .field("_xb_reserved7", &self._xb_reserved7)
291            .finish()
292    }
293}
294
295#[derive(Copy, Clone)]
296#[repr(C)]
297pub struct XbBuilderSourceCtxClass {
298    pub parent_class: gobject::GObjectClass,
299    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
300    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
301    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
302    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
303    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
304    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
305    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
306}
307
308impl ::std::fmt::Debug for XbBuilderSourceCtxClass {
309    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
310        f.debug_struct(&format!("XbBuilderSourceCtxClass @ {self:p}"))
311            .field("parent_class", &self.parent_class)
312            .field("_xb_reserved1", &self._xb_reserved1)
313            .field("_xb_reserved2", &self._xb_reserved2)
314            .field("_xb_reserved3", &self._xb_reserved3)
315            .field("_xb_reserved4", &self._xb_reserved4)
316            .field("_xb_reserved5", &self._xb_reserved5)
317            .field("_xb_reserved6", &self._xb_reserved6)
318            .field("_xb_reserved7", &self._xb_reserved7)
319            .finish()
320    }
321}
322
323#[derive(Copy, Clone)]
324#[repr(C)]
325pub struct XbMachineClass {
326    pub parent_class: gobject::GObjectClass,
327    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
328    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
329    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
330    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
331    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
332    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
333    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
334}
335
336impl ::std::fmt::Debug for XbMachineClass {
337    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
338        f.debug_struct(&format!("XbMachineClass @ {self:p}"))
339            .field("parent_class", &self.parent_class)
340            .field("_xb_reserved1", &self._xb_reserved1)
341            .field("_xb_reserved2", &self._xb_reserved2)
342            .field("_xb_reserved3", &self._xb_reserved3)
343            .field("_xb_reserved4", &self._xb_reserved4)
344            .field("_xb_reserved5", &self._xb_reserved5)
345            .field("_xb_reserved6", &self._xb_reserved6)
346            .field("_xb_reserved7", &self._xb_reserved7)
347            .finish()
348    }
349}
350
351#[derive(Copy, Clone)]
352#[repr(C)]
353pub struct XbNodeAttrIter {
354    pub dummy1: gpointer,
355    pub dummy2: u8,
356    pub dummy3: gpointer,
357    pub dummy4: gpointer,
358    pub dummy5: gpointer,
359    pub dummy6: gpointer,
360}
361
362impl ::std::fmt::Debug for XbNodeAttrIter {
363    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
364        f.debug_struct(&format!("XbNodeAttrIter @ {self:p}"))
365            .finish()
366    }
367}
368
369#[derive(Copy, Clone)]
370#[repr(C)]
371pub struct XbNodeChildIter {
372    pub dummy1: gpointer,
373    pub dummy2: gpointer,
374    pub dummy3: gboolean,
375    pub dummy4: gpointer,
376    pub dummy5: gpointer,
377    pub dummy6: gpointer,
378}
379
380impl ::std::fmt::Debug for XbNodeChildIter {
381    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
382        f.debug_struct(&format!("XbNodeChildIter @ {self:p}"))
383            .finish()
384    }
385}
386
387#[derive(Copy, Clone)]
388#[repr(C)]
389pub struct XbNodeClass {
390    pub parent_class: gobject::GObjectClass,
391    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
392    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
393    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
394    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
395    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
396    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
397    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
398}
399
400impl ::std::fmt::Debug for XbNodeClass {
401    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
402        f.debug_struct(&format!("XbNodeClass @ {self:p}"))
403            .field("parent_class", &self.parent_class)
404            .field("_xb_reserved1", &self._xb_reserved1)
405            .field("_xb_reserved2", &self._xb_reserved2)
406            .field("_xb_reserved3", &self._xb_reserved3)
407            .field("_xb_reserved4", &self._xb_reserved4)
408            .field("_xb_reserved5", &self._xb_reserved5)
409            .field("_xb_reserved6", &self._xb_reserved6)
410            .field("_xb_reserved7", &self._xb_reserved7)
411            .finish()
412    }
413}
414
415#[repr(C)]
416pub struct _XbOpcode {
417    _data: [u8; 0],
418    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
419}
420
421pub type XbOpcode = _XbOpcode;
422
423#[derive(Copy, Clone)]
424#[repr(C)]
425pub struct XbQueryClass {
426    pub parent_class: gobject::GObjectClass,
427    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
428    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
429    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
430    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
431    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
432    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
433    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
434}
435
436impl ::std::fmt::Debug for XbQueryClass {
437    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
438        f.debug_struct(&format!("XbQueryClass @ {self:p}"))
439            .field("parent_class", &self.parent_class)
440            .field("_xb_reserved1", &self._xb_reserved1)
441            .field("_xb_reserved2", &self._xb_reserved2)
442            .field("_xb_reserved3", &self._xb_reserved3)
443            .field("_xb_reserved4", &self._xb_reserved4)
444            .field("_xb_reserved5", &self._xb_reserved5)
445            .field("_xb_reserved6", &self._xb_reserved6)
446            .field("_xb_reserved7", &self._xb_reserved7)
447            .finish()
448    }
449}
450
451#[derive(Copy, Clone)]
452#[repr(C)]
453pub struct XbQueryContext {
454    pub dummy0: c_int,
455    pub dummy1: c_uint,
456    pub dummy2: XbValueBindings,
457    pub dummy3: [gpointer; 5],
458}
459
460impl ::std::fmt::Debug for XbQueryContext {
461    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
462        f.debug_struct(&format!("XbQueryContext @ {self:p}"))
463            .finish()
464    }
465}
466
467#[derive(Copy, Clone)]
468#[repr(C)]
469pub struct XbSiloClass {
470    pub parent_class: gobject::GObjectClass,
471    pub _xb_reserved1: Option<unsafe extern "C" fn()>,
472    pub _xb_reserved2: Option<unsafe extern "C" fn()>,
473    pub _xb_reserved3: Option<unsafe extern "C" fn()>,
474    pub _xb_reserved4: Option<unsafe extern "C" fn()>,
475    pub _xb_reserved5: Option<unsafe extern "C" fn()>,
476    pub _xb_reserved6: Option<unsafe extern "C" fn()>,
477    pub _xb_reserved7: Option<unsafe extern "C" fn()>,
478}
479
480impl ::std::fmt::Debug for XbSiloClass {
481    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
482        f.debug_struct(&format!("XbSiloClass @ {self:p}"))
483            .field("parent_class", &self.parent_class)
484            .field("_xb_reserved1", &self._xb_reserved1)
485            .field("_xb_reserved2", &self._xb_reserved2)
486            .field("_xb_reserved3", &self._xb_reserved3)
487            .field("_xb_reserved4", &self._xb_reserved4)
488            .field("_xb_reserved5", &self._xb_reserved5)
489            .field("_xb_reserved6", &self._xb_reserved6)
490            .field("_xb_reserved7", &self._xb_reserved7)
491            .finish()
492    }
493}
494
495#[repr(C)]
496pub struct XbStack {
497    _data: [u8; 0],
498    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
499}
500
501impl ::std::fmt::Debug for XbStack {
502    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
503        f.debug_struct(&format!("XbStack @ {self:p}")).finish()
504    }
505}
506
507#[derive(Copy, Clone)]
508#[repr(C)]
509pub struct XbValueBindings {
510    pub dummy0: u8,
511    pub dummy1: u32,
512    pub dummy2: [gpointer; 2],
513    pub dummy3: u8,
514    pub dummy4: u32,
515    pub dummy5: [gpointer; 2],
516    pub dummy6: u8,
517    pub dummy7: u32,
518    pub dummy8: [gpointer; 2],
519    pub dummy9: u8,
520    pub dummy10: u32,
521    pub dummy11: [gpointer; 2],
522    pub dummy12: [gpointer; 3],
523}
524
525impl ::std::fmt::Debug for XbValueBindings {
526    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
527        f.debug_struct(&format!("XbValueBindings @ {self:p}"))
528            .finish()
529    }
530}
531
532// Classes
533#[derive(Copy, Clone)]
534#[repr(C)]
535pub struct XbBuilder {
536    pub parent_instance: gobject::GObject,
537}
538
539impl ::std::fmt::Debug for XbBuilder {
540    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
541        f.debug_struct(&format!("XbBuilder @ {self:p}"))
542            .field("parent_instance", &self.parent_instance)
543            .finish()
544    }
545}
546
547#[derive(Copy, Clone)]
548#[repr(C)]
549pub struct XbBuilderFixup {
550    pub parent_instance: gobject::GObject,
551}
552
553impl ::std::fmt::Debug for XbBuilderFixup {
554    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
555        f.debug_struct(&format!("XbBuilderFixup @ {self:p}"))
556            .field("parent_instance", &self.parent_instance)
557            .finish()
558    }
559}
560
561#[derive(Copy, Clone)]
562#[repr(C)]
563pub struct XbBuilderNode {
564    pub parent_instance: gobject::GObject,
565}
566
567impl ::std::fmt::Debug for XbBuilderNode {
568    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
569        f.debug_struct(&format!("XbBuilderNode @ {self:p}"))
570            .field("parent_instance", &self.parent_instance)
571            .finish()
572    }
573}
574
575#[derive(Copy, Clone)]
576#[repr(C)]
577pub struct XbBuilderSource {
578    pub parent_instance: gobject::GObject,
579}
580
581impl ::std::fmt::Debug for XbBuilderSource {
582    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
583        f.debug_struct(&format!("XbBuilderSource @ {self:p}"))
584            .field("parent_instance", &self.parent_instance)
585            .finish()
586    }
587}
588
589#[derive(Copy, Clone)]
590#[repr(C)]
591pub struct XbBuilderSourceCtx {
592    pub parent_instance: gobject::GObject,
593}
594
595impl ::std::fmt::Debug for XbBuilderSourceCtx {
596    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
597        f.debug_struct(&format!("XbBuilderSourceCtx @ {self:p}"))
598            .field("parent_instance", &self.parent_instance)
599            .finish()
600    }
601}
602
603#[derive(Copy, Clone)]
604#[repr(C)]
605pub struct XbMachine {
606    pub parent_instance: gobject::GObject,
607}
608
609impl ::std::fmt::Debug for XbMachine {
610    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
611        f.debug_struct(&format!("XbMachine @ {self:p}"))
612            .field("parent_instance", &self.parent_instance)
613            .finish()
614    }
615}
616
617#[derive(Copy, Clone)]
618#[repr(C)]
619pub struct XbNode {
620    pub parent_instance: gobject::GObject,
621}
622
623impl ::std::fmt::Debug for XbNode {
624    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
625        f.debug_struct(&format!("XbNode @ {self:p}"))
626            .field("parent_instance", &self.parent_instance)
627            .finish()
628    }
629}
630
631#[derive(Copy, Clone)]
632#[repr(C)]
633pub struct XbQuery {
634    pub parent_instance: gobject::GObject,
635}
636
637impl ::std::fmt::Debug for XbQuery {
638    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
639        f.debug_struct(&format!("XbQuery @ {self:p}"))
640            .field("parent_instance", &self.parent_instance)
641            .finish()
642    }
643}
644
645#[derive(Copy, Clone)]
646#[repr(C)]
647pub struct XbSilo {
648    pub parent_instance: gobject::GObject,
649}
650
651impl ::std::fmt::Debug for XbSilo {
652    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
653        f.debug_struct(&format!("XbSilo @ {self:p}"))
654            .field("parent_instance", &self.parent_instance)
655            .finish()
656    }
657}
658
659#[link(name = "xmlb")]
660extern "C" {
661
662    //=========================================================================
663    // XbNodeAttrIter
664    //=========================================================================
665    pub fn xb_node_attr_iter_init(iter: *mut XbNodeAttrIter, self_: *mut XbNode);
666    pub fn xb_node_attr_iter_next(
667        iter: *mut XbNodeAttrIter,
668        name: *mut *const c_char,
669        value: *mut *const c_char,
670    ) -> gboolean;
671
672    //=========================================================================
673    // XbNodeChildIter
674    //=========================================================================
675    pub fn xb_node_child_iter_init(iter: *mut XbNodeChildIter, self_: *mut XbNode);
676    pub fn xb_node_child_iter_loop(iter: *mut XbNodeChildIter, child: *mut *mut XbNode)
677        -> gboolean;
678    pub fn xb_node_child_iter_next(iter: *mut XbNodeChildIter, child: *mut *mut XbNode)
679        -> gboolean;
680
681    //=========================================================================
682    // XbOpcode
683    //=========================================================================
684    pub fn xb_opcode_cmp_str(self_: *mut XbOpcode) -> gboolean;
685    pub fn xb_opcode_cmp_val(self_: *mut XbOpcode) -> gboolean;
686    pub fn xb_opcode_func_init(self_: *mut XbOpcode, func: u32);
687    pub fn xb_opcode_get_kind(self_: *mut XbOpcode) -> XbOpcodeKind;
688    pub fn xb_opcode_get_str(self_: *mut XbOpcode) -> *const c_char;
689    pub fn xb_opcode_get_val(self_: *mut XbOpcode) -> u32;
690    pub fn xb_opcode_integer_init(self_: *mut XbOpcode, val: u32);
691    pub fn xb_opcode_text_init(self_: *mut XbOpcode, str: *const c_char);
692    pub fn xb_opcode_text_init_static(self_: *mut XbOpcode, str: *const c_char);
693    pub fn xb_opcode_text_init_steal(self_: *mut XbOpcode, str: *mut c_char);
694    pub fn xb_opcode_to_string(self_: *mut XbOpcode) -> *mut c_char;
695    pub fn xb_opcode_kind_from_string(str: *const c_char) -> XbOpcodeKind;
696    pub fn xb_opcode_kind_to_string(kind: XbOpcodeKind) -> *const c_char;
697
698    //=========================================================================
699    // XbQueryContext
700    //=========================================================================
701    pub fn xb_query_context_get_type() -> GType;
702    pub fn xb_query_context_clear(self_: *mut XbQueryContext);
703    pub fn xb_query_context_copy(self_: *mut XbQueryContext) -> *mut XbQueryContext;
704    pub fn xb_query_context_free(self_: *mut XbQueryContext);
705    pub fn xb_query_context_get_bindings(self_: *mut XbQueryContext) -> *mut XbValueBindings;
706    pub fn xb_query_context_get_flags(self_: *mut XbQueryContext) -> XbQueryFlags;
707    pub fn xb_query_context_get_limit(self_: *mut XbQueryContext) -> c_uint;
708    pub fn xb_query_context_init(self_: *mut XbQueryContext);
709    pub fn xb_query_context_set_flags(self_: *mut XbQueryContext, flags: XbQueryFlags);
710    pub fn xb_query_context_set_limit(self_: *mut XbQueryContext, limit: c_uint);
711
712    //=========================================================================
713    // XbStack
714    //=========================================================================
715    pub fn xb_stack_get_type() -> GType;
716    pub fn xb_stack_pop(
717        self_: *mut XbStack,
718        opcode_out: *mut XbOpcode,
719        error: *mut *mut glib::GError,
720    ) -> gboolean;
721    pub fn xb_stack_push(
722        self_: *mut XbStack,
723        opcode_out: *mut *mut XbOpcode,
724        error: *mut *mut glib::GError,
725    ) -> gboolean;
726    pub fn xb_stack_to_string(self_: *mut XbStack) -> *mut c_char;
727
728    //=========================================================================
729    // XbValueBindings
730    //=========================================================================
731    pub fn xb_value_bindings_get_type() -> GType;
732    pub fn xb_value_bindings_bind_str(
733        self_: *mut XbValueBindings,
734        idx: c_uint,
735        str: *const c_char,
736        destroy_func: glib::GDestroyNotify,
737    );
738    pub fn xb_value_bindings_bind_val(self_: *mut XbValueBindings, idx: c_uint, val: u32);
739    pub fn xb_value_bindings_clear(self_: *mut XbValueBindings);
740    pub fn xb_value_bindings_copy(self_: *mut XbValueBindings) -> *mut XbValueBindings;
741    pub fn xb_value_bindings_copy_binding(
742        self_: *mut XbValueBindings,
743        idx: c_uint,
744        dest: *mut XbValueBindings,
745        dest_idx: c_uint,
746    ) -> gboolean;
747    pub fn xb_value_bindings_free(self_: *mut XbValueBindings);
748    pub fn xb_value_bindings_init(self_: *mut XbValueBindings);
749    pub fn xb_value_bindings_is_bound(self_: *mut XbValueBindings, idx: c_uint) -> gboolean;
750    pub fn xb_value_bindings_lookup_opcode(
751        self_: *mut XbValueBindings,
752        idx: c_uint,
753        opcode_out: *mut XbOpcode,
754    ) -> gboolean;
755
756    //=========================================================================
757    // XbBuilder
758    //=========================================================================
759    pub fn xb_builder_get_type() -> GType;
760    pub fn xb_builder_new() -> *mut XbBuilder;
761    pub fn xb_builder_add_fixup(self_: *mut XbBuilder, fixup: *mut XbBuilderFixup);
762    pub fn xb_builder_add_locale(self_: *mut XbBuilder, locale: *const c_char);
763    pub fn xb_builder_append_guid(self_: *mut XbBuilder, guid: *const c_char);
764    pub fn xb_builder_compile(
765        self_: *mut XbBuilder,
766        flags: XbBuilderCompileFlags,
767        cancellable: *mut gio::GCancellable,
768        error: *mut *mut glib::GError,
769    ) -> *mut XbSilo;
770    pub fn xb_builder_ensure(
771        self_: *mut XbBuilder,
772        file: *mut gio::GFile,
773        flags: XbBuilderCompileFlags,
774        cancellable: *mut gio::GCancellable,
775        error: *mut *mut glib::GError,
776    ) -> *mut XbSilo;
777    pub fn xb_builder_import_node(self_: *mut XbBuilder, bn: *mut XbBuilderNode);
778    pub fn xb_builder_import_source(self_: *mut XbBuilder, source: *mut XbBuilderSource);
779    pub fn xb_builder_set_profile_flags(self_: *mut XbBuilder, profile_flags: XbSiloProfileFlags);
780
781    //=========================================================================
782    // XbBuilderFixup
783    //=========================================================================
784    pub fn xb_builder_fixup_get_type() -> GType;
785    pub fn xb_builder_fixup_new(
786        id: *const c_char,
787        func: XbBuilderFixupFunc,
788        user_data: gpointer,
789        user_data_free: glib::GDestroyNotify,
790    ) -> *mut XbBuilderFixup;
791    pub fn xb_builder_fixup_get_max_depth(self_: *mut XbBuilderFixup) -> c_int;
792    pub fn xb_builder_fixup_set_max_depth(self_: *mut XbBuilderFixup, max_depth: c_int);
793
794    //=========================================================================
795    // XbBuilderNode
796    //=========================================================================
797    pub fn xb_builder_node_get_type() -> GType;
798    pub fn xb_builder_node_new(element: *const c_char) -> *mut XbBuilderNode;
799    pub fn xb_builder_node_add_child(self_: *mut XbBuilderNode, child: *mut XbBuilderNode);
800    pub fn xb_builder_node_add_flag(self_: *mut XbBuilderNode, flag: XbBuilderNodeFlags);
801    pub fn xb_builder_node_add_token(self_: *mut XbBuilderNode, token: *const c_char);
802    pub fn xb_builder_node_depth(self_: *mut XbBuilderNode) -> c_uint;
803    pub fn xb_builder_node_export(
804        self_: *mut XbBuilderNode,
805        flags: XbNodeExportFlags,
806        error: *mut *mut glib::GError,
807    ) -> *mut c_char;
808    pub fn xb_builder_node_get_attr(
809        self_: *mut XbBuilderNode,
810        name: *const c_char,
811    ) -> *const c_char;
812    pub fn xb_builder_node_get_attr_as_uint(self_: *mut XbBuilderNode, name: *const c_char) -> u64;
813    pub fn xb_builder_node_get_child(
814        self_: *mut XbBuilderNode,
815        element: *const c_char,
816        text: *const c_char,
817    ) -> *mut XbBuilderNode;
818    pub fn xb_builder_node_get_children(self_: *mut XbBuilderNode) -> *mut glib::GPtrArray;
819    pub fn xb_builder_node_get_element(self_: *mut XbBuilderNode) -> *const c_char;
820    pub fn xb_builder_node_get_first_child(self_: *mut XbBuilderNode) -> *mut XbBuilderNode;
821    pub fn xb_builder_node_get_last_child(self_: *mut XbBuilderNode) -> *mut XbBuilderNode;
822    pub fn xb_builder_node_get_parent(self_: *mut XbBuilderNode) -> *mut XbBuilderNode;
823    pub fn xb_builder_node_get_tail(self_: *mut XbBuilderNode) -> *const c_char;
824    pub fn xb_builder_node_get_text(self_: *mut XbBuilderNode) -> *const c_char;
825    pub fn xb_builder_node_get_text_as_uint(self_: *mut XbBuilderNode) -> u64;
826    pub fn xb_builder_node_get_tokens(self_: *mut XbBuilderNode) -> *mut glib::GPtrArray;
827    pub fn xb_builder_node_has_flag(
828        self_: *mut XbBuilderNode,
829        flag: XbBuilderNodeFlags,
830    ) -> gboolean;
831    pub fn xb_builder_node_insert(
832        parent: *mut XbBuilderNode,
833        element: *const c_char,
834        ...
835    ) -> *mut XbBuilderNode;
836    pub fn xb_builder_node_insert_text(
837        parent: *mut XbBuilderNode,
838        element: *const c_char,
839        text: *const c_char,
840        ...
841    );
842    pub fn xb_builder_node_remove_attr(self_: *mut XbBuilderNode, name: *const c_char);
843    pub fn xb_builder_node_remove_child(self_: *mut XbBuilderNode, child: *mut XbBuilderNode);
844    pub fn xb_builder_node_set_attr(
845        self_: *mut XbBuilderNode,
846        name: *const c_char,
847        value: *const c_char,
848    );
849    pub fn xb_builder_node_set_element(self_: *mut XbBuilderNode, element: *const c_char);
850    pub fn xb_builder_node_set_tail(
851        self_: *mut XbBuilderNode,
852        tail: *const c_char,
853        tail_len: ssize_t,
854    );
855    pub fn xb_builder_node_set_text(
856        self_: *mut XbBuilderNode,
857        text: *const c_char,
858        text_len: ssize_t,
859    );
860    pub fn xb_builder_node_sort_children(
861        self_: *mut XbBuilderNode,
862        func: XbBuilderNodeSortFunc,
863        user_data: gpointer,
864    );
865    pub fn xb_builder_node_tokenize_text(self_: *mut XbBuilderNode);
866    pub fn xb_builder_node_traverse(
867        self_: *mut XbBuilderNode,
868        order: glib::GTraverseType,
869        flags: glib::GTraverseFlags,
870        max_depth: c_int,
871        func: XbBuilderNodeTraverseFunc,
872        user_data: gpointer,
873    );
874    pub fn xb_builder_node_unlink(self_: *mut XbBuilderNode);
875
876    //=========================================================================
877    // XbBuilderSource
878    //=========================================================================
879    pub fn xb_builder_source_get_type() -> GType;
880    pub fn xb_builder_source_new() -> *mut XbBuilderSource;
881    pub fn xb_builder_source_add_adapter(
882        self_: *mut XbBuilderSource,
883        content_types: *const c_char,
884        func: XbBuilderSourceAdapterFunc,
885        user_data: gpointer,
886        user_data_free: glib::GDestroyNotify,
887    );
888    pub fn xb_builder_source_add_fixup(self_: *mut XbBuilderSource, fixup: *mut XbBuilderFixup);
889    pub fn xb_builder_source_add_simple_adapter(
890        self_: *mut XbBuilderSource,
891        content_types: *const c_char,
892        func: XbBuilderSourceAdapterFunc,
893        user_data: gpointer,
894        user_data_free: glib::GDestroyNotify,
895    );
896    pub fn xb_builder_source_load_bytes(
897        self_: *mut XbBuilderSource,
898        bytes: *mut glib::GBytes,
899        flags: XbBuilderSourceFlags,
900        error: *mut *mut glib::GError,
901    ) -> gboolean;
902    pub fn xb_builder_source_load_file(
903        self_: *mut XbBuilderSource,
904        file: *mut gio::GFile,
905        flags: XbBuilderSourceFlags,
906        cancellable: *mut gio::GCancellable,
907        error: *mut *mut glib::GError,
908    ) -> gboolean;
909    pub fn xb_builder_source_load_xml(
910        self_: *mut XbBuilderSource,
911        xml: *const c_char,
912        flags: XbBuilderSourceFlags,
913        error: *mut *mut glib::GError,
914    ) -> gboolean;
915    pub fn xb_builder_source_set_info(self_: *mut XbBuilderSource, info: *mut XbBuilderNode);
916    pub fn xb_builder_source_set_prefix(self_: *mut XbBuilderSource, prefix: *const c_char);
917
918    //=========================================================================
919    // XbBuilderSourceCtx
920    //=========================================================================
921    pub fn xb_builder_source_ctx_get_type() -> GType;
922    pub fn xb_builder_source_ctx_get_bytes(
923        self_: *mut XbBuilderSourceCtx,
924        cancellable: *mut gio::GCancellable,
925        error: *mut *mut glib::GError,
926    ) -> *mut glib::GBytes;
927    pub fn xb_builder_source_ctx_get_filename(self_: *mut XbBuilderSourceCtx) -> *const c_char;
928    pub fn xb_builder_source_ctx_get_stream(
929        self_: *mut XbBuilderSourceCtx,
930    ) -> *mut gio::GInputStream;
931
932    //=========================================================================
933    // XbMachine
934    //=========================================================================
935    pub fn xb_machine_get_type() -> GType;
936    pub fn xb_machine_new() -> *mut XbMachine;
937    pub fn xb_machine_add_method(
938        self_: *mut XbMachine,
939        name: *const c_char,
940        n_opcodes: c_uint,
941        method_cb: XbMachineMethodFunc,
942        user_data: gpointer,
943        user_data_free: glib::GDestroyNotify,
944    );
945    pub fn xb_machine_add_opcode_fixup(
946        self_: *mut XbMachine,
947        opcodes_sig: *const c_char,
948        fixup_cb: XbMachineOpcodeFixupFunc,
949        user_data: gpointer,
950        user_data_free: glib::GDestroyNotify,
951    );
952    pub fn xb_machine_add_operator(self_: *mut XbMachine, str: *const c_char, name: *const c_char);
953    pub fn xb_machine_add_text_handler(
954        self_: *mut XbMachine,
955        handler_cb: XbMachineTextHandlerFunc,
956        user_data: gpointer,
957        user_data_free: glib::GDestroyNotify,
958    );
959    pub fn xb_machine_get_stack_size(self_: *mut XbMachine) -> c_uint;
960    pub fn xb_machine_opcode_func_init(
961        self_: *mut XbMachine,
962        opcode: *mut XbOpcode,
963        func_name: *const c_char,
964    ) -> gboolean;
965    pub fn xb_machine_parse(
966        self_: *mut XbMachine,
967        text: *const c_char,
968        text_len: ssize_t,
969        error: *mut *mut glib::GError,
970    ) -> *mut XbStack;
971    pub fn xb_machine_parse_full(
972        self_: *mut XbMachine,
973        text: *const c_char,
974        text_len: ssize_t,
975        flags: XbMachineParseFlags,
976        error: *mut *mut glib::GError,
977    ) -> *mut XbStack;
978    pub fn xb_machine_run(
979        self_: *mut XbMachine,
980        opcodes: *mut XbStack,
981        result: *mut gboolean,
982        exec_data: gpointer,
983        error: *mut *mut glib::GError,
984    ) -> gboolean;
985    pub fn xb_machine_run_with_bindings(
986        self_: *mut XbMachine,
987        opcodes: *mut XbStack,
988        bindings: *mut XbValueBindings,
989        result: *mut gboolean,
990        exec_data: gpointer,
991        error: *mut *mut glib::GError,
992    ) -> gboolean;
993    pub fn xb_machine_set_debug_flags(self_: *mut XbMachine, flags: XbMachineDebugFlags);
994    pub fn xb_machine_set_stack_size(self_: *mut XbMachine, stack_size: c_uint);
995    pub fn xb_machine_stack_pop(
996        self_: *mut XbMachine,
997        stack: *mut XbStack,
998        opcode_out: *mut XbOpcode,
999        error: *mut *mut glib::GError,
1000    ) -> gboolean;
1001    pub fn xb_machine_stack_push(
1002        self_: *mut XbMachine,
1003        stack: *mut XbStack,
1004        opcode_out: *mut *mut XbOpcode,
1005        error: *mut *mut glib::GError,
1006    ) -> gboolean;
1007    pub fn xb_machine_stack_push_integer(
1008        self_: *mut XbMachine,
1009        stack: *mut XbStack,
1010        val: u32,
1011        error: *mut *mut glib::GError,
1012    ) -> gboolean;
1013    pub fn xb_machine_stack_push_text(
1014        self_: *mut XbMachine,
1015        stack: *mut XbStack,
1016        str: *const c_char,
1017        error: *mut *mut glib::GError,
1018    ) -> gboolean;
1019    pub fn xb_machine_stack_push_text_static(
1020        self_: *mut XbMachine,
1021        stack: *mut XbStack,
1022        str: *const c_char,
1023        error: *mut *mut glib::GError,
1024    ) -> gboolean;
1025    pub fn xb_machine_stack_push_text_steal(
1026        self_: *mut XbMachine,
1027        stack: *mut XbStack,
1028        str: *mut c_char,
1029        error: *mut *mut glib::GError,
1030    ) -> gboolean;
1031
1032    //=========================================================================
1033    // XbNode
1034    //=========================================================================
1035    pub fn xb_node_get_type() -> GType;
1036    pub fn xb_node_export(
1037        self_: *mut XbNode,
1038        flags: XbNodeExportFlags,
1039        error: *mut *mut glib::GError,
1040    ) -> *mut c_char;
1041    pub fn xb_node_get_attr(self_: *mut XbNode, name: *const c_char) -> *const c_char;
1042    pub fn xb_node_get_attr_as_uint(self_: *mut XbNode, name: *const c_char) -> u64;
1043    pub fn xb_node_get_child(self_: *mut XbNode) -> *mut XbNode;
1044    pub fn xb_node_get_children(self_: *mut XbNode) -> *mut glib::GPtrArray;
1045    pub fn xb_node_get_data(self_: *mut XbNode, key: *const c_char) -> *mut glib::GBytes;
1046    pub fn xb_node_get_depth(self_: *mut XbNode) -> c_uint;
1047    pub fn xb_node_get_element(self_: *mut XbNode) -> *const c_char;
1048    pub fn xb_node_get_next(self_: *mut XbNode) -> *mut XbNode;
1049    pub fn xb_node_get_parent(self_: *mut XbNode) -> *mut XbNode;
1050    pub fn xb_node_get_root(self_: *mut XbNode) -> *mut XbNode;
1051    pub fn xb_node_get_silo(self_: *mut XbNode) -> *mut XbSilo;
1052    pub fn xb_node_get_tail(self_: *mut XbNode) -> *const c_char;
1053    pub fn xb_node_get_text(self_: *mut XbNode) -> *const c_char;
1054    pub fn xb_node_get_text_as_uint(self_: *mut XbNode) -> u64;
1055    pub fn xb_node_query(
1056        self_: *mut XbNode,
1057        xpath: *const c_char,
1058        limit: c_uint,
1059        error: *mut *mut glib::GError,
1060    ) -> *mut glib::GPtrArray;
1061    pub fn xb_node_query_attr(
1062        self_: *mut XbNode,
1063        xpath: *const c_char,
1064        name: *const c_char,
1065        error: *mut *mut glib::GError,
1066    ) -> *const c_char;
1067    pub fn xb_node_query_attr_as_uint(
1068        self_: *mut XbNode,
1069        xpath: *const c_char,
1070        name: *const c_char,
1071        error: *mut *mut glib::GError,
1072    ) -> u64;
1073    pub fn xb_node_query_export(
1074        self_: *mut XbNode,
1075        xpath: *const c_char,
1076        error: *mut *mut glib::GError,
1077    ) -> *mut c_char;
1078    pub fn xb_node_query_first(
1079        self_: *mut XbNode,
1080        xpath: *const c_char,
1081        error: *mut *mut glib::GError,
1082    ) -> *mut XbNode;
1083    pub fn xb_node_query_first_full(
1084        self_: *mut XbNode,
1085        query: *mut XbQuery,
1086        error: *mut *mut glib::GError,
1087    ) -> *mut XbNode;
1088    pub fn xb_node_query_first_with_context(
1089        self_: *mut XbNode,
1090        query: *mut XbQuery,
1091        context: *mut XbQueryContext,
1092        error: *mut *mut glib::GError,
1093    ) -> *mut XbNode;
1094    pub fn xb_node_query_full(
1095        self_: *mut XbNode,
1096        query: *mut XbQuery,
1097        error: *mut *mut glib::GError,
1098    ) -> *mut glib::GPtrArray;
1099    pub fn xb_node_query_text(
1100        self_: *mut XbNode,
1101        xpath: *const c_char,
1102        error: *mut *mut glib::GError,
1103    ) -> *const c_char;
1104    pub fn xb_node_query_text_as_uint(
1105        self_: *mut XbNode,
1106        xpath: *const c_char,
1107        error: *mut *mut glib::GError,
1108    ) -> u64;
1109    pub fn xb_node_query_with_context(
1110        self_: *mut XbNode,
1111        query: *mut XbQuery,
1112        context: *mut XbQueryContext,
1113        error: *mut *mut glib::GError,
1114    ) -> *mut glib::GPtrArray;
1115    pub fn xb_node_set_data(self_: *mut XbNode, key: *const c_char, data: *mut glib::GBytes);
1116    pub fn xb_node_transmogrify(
1117        self_: *mut XbNode,
1118        func_text: XbNodeTransmogrifyFunc,
1119        func_tail: XbNodeTransmogrifyFunc,
1120        user_data: gpointer,
1121    ) -> gboolean;
1122
1123    //=========================================================================
1124    // XbQuery
1125    //=========================================================================
1126    pub fn xb_query_get_type() -> GType;
1127    pub fn xb_query_new(
1128        silo: *mut XbSilo,
1129        xpath: *const c_char,
1130        error: *mut *mut glib::GError,
1131    ) -> *mut XbQuery;
1132    pub fn xb_query_new_full(
1133        silo: *mut XbSilo,
1134        xpath: *const c_char,
1135        flags: XbQueryFlags,
1136        error: *mut *mut glib::GError,
1137    ) -> *mut XbQuery;
1138    pub fn xb_query_bind_str(
1139        self_: *mut XbQuery,
1140        idx: c_uint,
1141        str: *const c_char,
1142        error: *mut *mut glib::GError,
1143    ) -> gboolean;
1144    pub fn xb_query_bind_val(
1145        self_: *mut XbQuery,
1146        idx: c_uint,
1147        val: u32,
1148        error: *mut *mut glib::GError,
1149    ) -> gboolean;
1150    pub fn xb_query_get_flags(self_: *mut XbQuery) -> XbQueryFlags;
1151    pub fn xb_query_get_limit(self_: *mut XbQuery) -> c_uint;
1152    pub fn xb_query_get_xpath(self_: *mut XbQuery) -> *const c_char;
1153    pub fn xb_query_set_flags(self_: *mut XbQuery, flags: XbQueryFlags);
1154    pub fn xb_query_set_limit(self_: *mut XbQuery, limit: c_uint);
1155
1156    //=========================================================================
1157    // XbSilo
1158    //=========================================================================
1159    pub fn xb_silo_get_type() -> GType;
1160    pub fn xb_silo_new() -> *mut XbSilo;
1161    pub fn xb_silo_new_from_xml(xml: *const c_char, error: *mut *mut glib::GError) -> *mut XbSilo;
1162    pub fn xb_silo_export(
1163        self_: *mut XbSilo,
1164        flags: XbNodeExportFlags,
1165        error: *mut *mut glib::GError,
1166    ) -> *mut c_char;
1167    pub fn xb_silo_export_file(
1168        self_: *mut XbSilo,
1169        file: *mut gio::GFile,
1170        flags: XbNodeExportFlags,
1171        cancellable: *mut gio::GCancellable,
1172        error: *mut *mut glib::GError,
1173    ) -> gboolean;
1174    pub fn xb_silo_get_bytes(self_: *mut XbSilo) -> *mut glib::GBytes;
1175    pub fn xb_silo_get_enable_node_cache(self_: *mut XbSilo) -> gboolean;
1176    pub fn xb_silo_get_guid(self_: *mut XbSilo) -> *const c_char;
1177    pub fn xb_silo_get_profile_string(self_: *mut XbSilo) -> *const c_char;
1178    pub fn xb_silo_get_root(self_: *mut XbSilo) -> *mut XbNode;
1179    pub fn xb_silo_get_size(self_: *mut XbSilo) -> c_uint;
1180    pub fn xb_silo_invalidate(self_: *mut XbSilo);
1181    pub fn xb_silo_is_valid(self_: *mut XbSilo) -> gboolean;
1182    pub fn xb_silo_load_from_bytes(
1183        self_: *mut XbSilo,
1184        blob: *mut glib::GBytes,
1185        flags: XbSiloLoadFlags,
1186        error: *mut *mut glib::GError,
1187    ) -> gboolean;
1188    pub fn xb_silo_load_from_file(
1189        self_: *mut XbSilo,
1190        file: *mut gio::GFile,
1191        flags: XbSiloLoadFlags,
1192        cancellable: *mut gio::GCancellable,
1193        error: *mut *mut glib::GError,
1194    ) -> gboolean;
1195    pub fn xb_silo_lookup_query(self_: *mut XbSilo, xpath: *const c_char) -> *mut XbQuery;
1196    pub fn xb_silo_query(
1197        self_: *mut XbSilo,
1198        xpath: *const c_char,
1199        limit: c_uint,
1200        error: *mut *mut glib::GError,
1201    ) -> *mut glib::GPtrArray;
1202    pub fn xb_silo_query_build_index(
1203        self_: *mut XbSilo,
1204        xpath: *const c_char,
1205        attr: *const c_char,
1206        error: *mut *mut glib::GError,
1207    ) -> gboolean;
1208    pub fn xb_silo_query_first(
1209        self_: *mut XbSilo,
1210        xpath: *const c_char,
1211        error: *mut *mut glib::GError,
1212    ) -> *mut XbNode;
1213    pub fn xb_silo_query_first_full(
1214        self_: *mut XbSilo,
1215        query: *mut XbQuery,
1216        error: *mut *mut glib::GError,
1217    ) -> *mut XbNode;
1218    pub fn xb_silo_query_first_with_context(
1219        self_: *mut XbSilo,
1220        query: *mut XbQuery,
1221        context: *mut XbQueryContext,
1222        error: *mut *mut glib::GError,
1223    ) -> *mut XbNode;
1224    pub fn xb_silo_query_full(
1225        self_: *mut XbSilo,
1226        query: *mut XbQuery,
1227        error: *mut *mut glib::GError,
1228    ) -> *mut glib::GPtrArray;
1229    pub fn xb_silo_query_with_context(
1230        self_: *mut XbSilo,
1231        query: *mut XbQuery,
1232        context: *mut XbQueryContext,
1233        error: *mut *mut glib::GError,
1234    ) -> *mut glib::GPtrArray;
1235    pub fn xb_silo_save_to_file(
1236        self_: *mut XbSilo,
1237        file: *mut gio::GFile,
1238        cancellable: *mut gio::GCancellable,
1239        error: *mut *mut glib::GError,
1240    ) -> gboolean;
1241    pub fn xb_silo_set_enable_node_cache(self_: *mut XbSilo, enable_node_cache: gboolean);
1242    pub fn xb_silo_set_profile_flags(self_: *mut XbSilo, profile_flags: XbSiloProfileFlags);
1243    pub fn xb_silo_to_string(self_: *mut XbSilo, error: *mut *mut glib::GError) -> *mut c_char;
1244    pub fn xb_silo_watch_file(
1245        self_: *mut XbSilo,
1246        file: *mut gio::GFile,
1247        cancellable: *mut gio::GCancellable,
1248        error: *mut *mut glib::GError,
1249    ) -> gboolean;
1250
1251    //=========================================================================
1252    // Other functions
1253    //=========================================================================
1254    pub fn xb_string_append_union(xpath: *mut glib::GString, fmt: *const c_char, ...);
1255    pub fn xb_string_escape(str: *const c_char) -> *mut c_char;
1256    pub fn xb_version_string() -> *const c_char;
1257
1258}