1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{prelude::*, translate::*};
6use std::fmt;
7
8#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
9#[non_exhaustive]
10#[doc(alias = "GChecksumType")]
11pub enum ChecksumType {
12 #[doc(alias = "G_CHECKSUM_MD5")]
13 Md5,
14 #[doc(alias = "G_CHECKSUM_SHA1")]
15 Sha1,
16 #[doc(alias = "G_CHECKSUM_SHA256")]
17 Sha256,
18 #[doc(alias = "G_CHECKSUM_SHA512")]
19 Sha512,
20 #[doc(alias = "G_CHECKSUM_SHA384")]
21 Sha384,
22 #[doc(hidden)]
23 __Unknown(i32),
24}
25
26impl fmt::Display for ChecksumType {
27 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
28 write!(
29 f,
30 "ChecksumType::{}",
31 match *self {
32 Self::Md5 => "Md5",
33 Self::Sha1 => "Sha1",
34 Self::Sha256 => "Sha256",
35 Self::Sha512 => "Sha512",
36 Self::Sha384 => "Sha384",
37 _ => "Unknown",
38 }
39 )
40 }
41}
42
43#[doc(hidden)]
44impl IntoGlib for ChecksumType {
45 type GlibType = ffi::GChecksumType;
46
47 #[inline]
48 fn into_glib(self) -> ffi::GChecksumType {
49 match self {
50 Self::Md5 => ffi::G_CHECKSUM_MD5,
51 Self::Sha1 => ffi::G_CHECKSUM_SHA1,
52 Self::Sha256 => ffi::G_CHECKSUM_SHA256,
53 Self::Sha512 => ffi::G_CHECKSUM_SHA512,
54 Self::Sha384 => ffi::G_CHECKSUM_SHA384,
55 Self::__Unknown(value: i32) => value,
56 }
57 }
58}
59
60#[doc(hidden)]
61impl FromGlib<ffi::GChecksumType> for ChecksumType {
62 #[inline]
63 unsafe fn from_glib(value: ffi::GChecksumType) -> Self {
64 match value {
65 ffi::G_CHECKSUM_MD5 => Self::Md5,
66 ffi::G_CHECKSUM_SHA1 => Self::Sha1,
67 ffi::G_CHECKSUM_SHA256 => Self::Sha256,
68 ffi::G_CHECKSUM_SHA512 => Self::Sha512,
69 ffi::G_CHECKSUM_SHA384 => Self::Sha384,
70 value: i32 => Self::__Unknown(value),
71 }
72 }
73}
74
75#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
76#[non_exhaustive]
77#[doc(alias = "GConvertError")]
78pub enum ConvertError {
79 #[doc(alias = "G_CONVERT_ERROR_NO_CONVERSION")]
80 NoConversion,
81 #[doc(alias = "G_CONVERT_ERROR_ILLEGAL_SEQUENCE")]
82 IllegalSequence,
83 #[doc(alias = "G_CONVERT_ERROR_FAILED")]
84 Failed,
85 #[doc(alias = "G_CONVERT_ERROR_PARTIAL_INPUT")]
86 PartialInput,
87 #[doc(alias = "G_CONVERT_ERROR_BAD_URI")]
88 BadUri,
89 #[doc(alias = "G_CONVERT_ERROR_NOT_ABSOLUTE_PATH")]
90 NotAbsolutePath,
91 #[doc(alias = "G_CONVERT_ERROR_NO_MEMORY")]
92 NoMemory,
93 #[doc(alias = "G_CONVERT_ERROR_EMBEDDED_NUL")]
94 EmbeddedNul,
95 #[doc(hidden)]
96 __Unknown(i32),
97}
98
99impl fmt::Display for ConvertError {
100 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
101 write!(
102 f,
103 "ConvertError::{}",
104 match *self {
105 Self::NoConversion => "NoConversion",
106 Self::IllegalSequence => "IllegalSequence",
107 Self::Failed => "Failed",
108 Self::PartialInput => "PartialInput",
109 Self::BadUri => "BadUri",
110 Self::NotAbsolutePath => "NotAbsolutePath",
111 Self::NoMemory => "NoMemory",
112 Self::EmbeddedNul => "EmbeddedNul",
113 _ => "Unknown",
114 }
115 )
116 }
117}
118
119#[doc(hidden)]
120impl IntoGlib for ConvertError {
121 type GlibType = ffi::GConvertError;
122
123 #[inline]
124 fn into_glib(self) -> ffi::GConvertError {
125 match self {
126 Self::NoConversion => ffi::G_CONVERT_ERROR_NO_CONVERSION,
127 Self::IllegalSequence => ffi::G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
128 Self::Failed => ffi::G_CONVERT_ERROR_FAILED,
129 Self::PartialInput => ffi::G_CONVERT_ERROR_PARTIAL_INPUT,
130 Self::BadUri => ffi::G_CONVERT_ERROR_BAD_URI,
131 Self::NotAbsolutePath => ffi::G_CONVERT_ERROR_NOT_ABSOLUTE_PATH,
132 Self::NoMemory => ffi::G_CONVERT_ERROR_NO_MEMORY,
133 Self::EmbeddedNul => ffi::G_CONVERT_ERROR_EMBEDDED_NUL,
134 Self::__Unknown(value: i32) => value,
135 }
136 }
137}
138
139#[doc(hidden)]
140impl FromGlib<ffi::GConvertError> for ConvertError {
141 #[inline]
142 unsafe fn from_glib(value: ffi::GConvertError) -> Self {
143 match value {
144 ffi::G_CONVERT_ERROR_NO_CONVERSION => Self::NoConversion,
145 ffi::G_CONVERT_ERROR_ILLEGAL_SEQUENCE => Self::IllegalSequence,
146 ffi::G_CONVERT_ERROR_FAILED => Self::Failed,
147 ffi::G_CONVERT_ERROR_PARTIAL_INPUT => Self::PartialInput,
148 ffi::G_CONVERT_ERROR_BAD_URI => Self::BadUri,
149 ffi::G_CONVERT_ERROR_NOT_ABSOLUTE_PATH => Self::NotAbsolutePath,
150 ffi::G_CONVERT_ERROR_NO_MEMORY => Self::NoMemory,
151 ffi::G_CONVERT_ERROR_EMBEDDED_NUL => Self::EmbeddedNul,
152 value: i32 => Self::__Unknown(value),
153 }
154 }
155}
156
157impl crate::error::ErrorDomain for ConvertError {
158 #[inline]
159 fn domain() -> crate::Quark {
160 unsafe { from_glib(val:ffi::g_convert_error_quark()) }
161 }
162
163 #[inline]
164 fn code(self) -> i32 {
165 self.into_glib()
166 }
167
168 #[inline]
169 #[allow(clippy::match_single_binding)]
170 fn from(code: i32) -> Option<Self> {
171 match unsafe { from_glib(val:code) } {
172 Self::__Unknown(_) => Some(Self::Failed),
173 value: ConvertError => Some(value),
174 }
175 }
176}
177
178#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
179#[non_exhaustive]
180#[doc(alias = "GDateMonth")]
181pub enum DateMonth {
182 #[doc(alias = "G_DATE_BAD_MONTH")]
183 BadMonth,
184 #[doc(alias = "G_DATE_JANUARY")]
185 January,
186 #[doc(alias = "G_DATE_FEBRUARY")]
187 February,
188 #[doc(alias = "G_DATE_MARCH")]
189 March,
190 #[doc(alias = "G_DATE_APRIL")]
191 April,
192 #[doc(alias = "G_DATE_MAY")]
193 May,
194 #[doc(alias = "G_DATE_JUNE")]
195 June,
196 #[doc(alias = "G_DATE_JULY")]
197 July,
198 #[doc(alias = "G_DATE_AUGUST")]
199 August,
200 #[doc(alias = "G_DATE_SEPTEMBER")]
201 September,
202 #[doc(alias = "G_DATE_OCTOBER")]
203 October,
204 #[doc(alias = "G_DATE_NOVEMBER")]
205 November,
206 #[doc(alias = "G_DATE_DECEMBER")]
207 December,
208 #[doc(hidden)]
209 __Unknown(i32),
210}
211
212impl fmt::Display for DateMonth {
213 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
214 write!(
215 f,
216 "DateMonth::{}",
217 match *self {
218 Self::BadMonth => "BadMonth",
219 Self::January => "January",
220 Self::February => "February",
221 Self::March => "March",
222 Self::April => "April",
223 Self::May => "May",
224 Self::June => "June",
225 Self::July => "July",
226 Self::August => "August",
227 Self::September => "September",
228 Self::October => "October",
229 Self::November => "November",
230 Self::December => "December",
231 _ => "Unknown",
232 }
233 )
234 }
235}
236
237#[doc(hidden)]
238impl IntoGlib for DateMonth {
239 type GlibType = ffi::GDateMonth;
240
241 fn into_glib(self) -> ffi::GDateMonth {
242 match self {
243 Self::BadMonth => ffi::G_DATE_BAD_MONTH,
244 Self::January => ffi::G_DATE_JANUARY,
245 Self::February => ffi::G_DATE_FEBRUARY,
246 Self::March => ffi::G_DATE_MARCH,
247 Self::April => ffi::G_DATE_APRIL,
248 Self::May => ffi::G_DATE_MAY,
249 Self::June => ffi::G_DATE_JUNE,
250 Self::July => ffi::G_DATE_JULY,
251 Self::August => ffi::G_DATE_AUGUST,
252 Self::September => ffi::G_DATE_SEPTEMBER,
253 Self::October => ffi::G_DATE_OCTOBER,
254 Self::November => ffi::G_DATE_NOVEMBER,
255 Self::December => ffi::G_DATE_DECEMBER,
256 Self::__Unknown(value: i32) => value,
257 }
258 }
259}
260
261#[doc(hidden)]
262impl FromGlib<ffi::GDateMonth> for DateMonth {
263 unsafe fn from_glib(value: ffi::GDateMonth) -> Self {
264 match value {
265 ffi::G_DATE_BAD_MONTH => Self::BadMonth,
266 ffi::G_DATE_JANUARY => Self::January,
267 ffi::G_DATE_FEBRUARY => Self::February,
268 ffi::G_DATE_MARCH => Self::March,
269 ffi::G_DATE_APRIL => Self::April,
270 ffi::G_DATE_MAY => Self::May,
271 ffi::G_DATE_JUNE => Self::June,
272 ffi::G_DATE_JULY => Self::July,
273 ffi::G_DATE_AUGUST => Self::August,
274 ffi::G_DATE_SEPTEMBER => Self::September,
275 ffi::G_DATE_OCTOBER => Self::October,
276 ffi::G_DATE_NOVEMBER => Self::November,
277 ffi::G_DATE_DECEMBER => Self::December,
278 value: i32 => Self::__Unknown(value),
279 }
280 }
281}
282
283#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
284#[non_exhaustive]
285#[doc(alias = "GDateWeekday")]
286pub enum DateWeekday {
287 #[doc(alias = "G_DATE_BAD_WEEKDAY")]
288 BadWeekday,
289 #[doc(alias = "G_DATE_MONDAY")]
290 Monday,
291 #[doc(alias = "G_DATE_TUESDAY")]
292 Tuesday,
293 #[doc(alias = "G_DATE_WEDNESDAY")]
294 Wednesday,
295 #[doc(alias = "G_DATE_THURSDAY")]
296 Thursday,
297 #[doc(alias = "G_DATE_FRIDAY")]
298 Friday,
299 #[doc(alias = "G_DATE_SATURDAY")]
300 Saturday,
301 #[doc(alias = "G_DATE_SUNDAY")]
302 Sunday,
303 #[doc(hidden)]
304 __Unknown(i32),
305}
306
307impl fmt::Display for DateWeekday {
308 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
309 write!(
310 f,
311 "DateWeekday::{}",
312 match *self {
313 Self::BadWeekday => "BadWeekday",
314 Self::Monday => "Monday",
315 Self::Tuesday => "Tuesday",
316 Self::Wednesday => "Wednesday",
317 Self::Thursday => "Thursday",
318 Self::Friday => "Friday",
319 Self::Saturday => "Saturday",
320 Self::Sunday => "Sunday",
321 _ => "Unknown",
322 }
323 )
324 }
325}
326
327#[doc(hidden)]
328impl IntoGlib for DateWeekday {
329 type GlibType = ffi::GDateWeekday;
330
331 #[inline]
332 fn into_glib(self) -> ffi::GDateWeekday {
333 match self {
334 Self::BadWeekday => ffi::G_DATE_BAD_WEEKDAY,
335 Self::Monday => ffi::G_DATE_MONDAY,
336 Self::Tuesday => ffi::G_DATE_TUESDAY,
337 Self::Wednesday => ffi::G_DATE_WEDNESDAY,
338 Self::Thursday => ffi::G_DATE_THURSDAY,
339 Self::Friday => ffi::G_DATE_FRIDAY,
340 Self::Saturday => ffi::G_DATE_SATURDAY,
341 Self::Sunday => ffi::G_DATE_SUNDAY,
342 Self::__Unknown(value: i32) => value,
343 }
344 }
345}
346
347#[doc(hidden)]
348impl FromGlib<ffi::GDateWeekday> for DateWeekday {
349 #[inline]
350 unsafe fn from_glib(value: ffi::GDateWeekday) -> Self {
351 match value {
352 ffi::G_DATE_BAD_WEEKDAY => Self::BadWeekday,
353 ffi::G_DATE_MONDAY => Self::Monday,
354 ffi::G_DATE_TUESDAY => Self::Tuesday,
355 ffi::G_DATE_WEDNESDAY => Self::Wednesday,
356 ffi::G_DATE_THURSDAY => Self::Thursday,
357 ffi::G_DATE_FRIDAY => Self::Friday,
358 ffi::G_DATE_SATURDAY => Self::Saturday,
359 ffi::G_DATE_SUNDAY => Self::Sunday,
360 value: i32 => Self::__Unknown(value),
361 }
362 }
363}
364
365#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
366#[non_exhaustive]
367#[doc(alias = "GFileError")]
368pub enum FileError {
369 #[doc(alias = "G_FILE_ERROR_EXIST")]
370 Exist,
371 #[doc(alias = "G_FILE_ERROR_ISDIR")]
372 Isdir,
373 #[doc(alias = "G_FILE_ERROR_ACCES")]
374 Acces,
375 #[doc(alias = "G_FILE_ERROR_NAMETOOLONG")]
376 Nametoolong,
377 #[doc(alias = "G_FILE_ERROR_NOENT")]
378 Noent,
379 #[doc(alias = "G_FILE_ERROR_NOTDIR")]
380 Notdir,
381 #[doc(alias = "G_FILE_ERROR_NXIO")]
382 Nxio,
383 #[doc(alias = "G_FILE_ERROR_NODEV")]
384 Nodev,
385 #[doc(alias = "G_FILE_ERROR_ROFS")]
386 Rofs,
387 #[doc(alias = "G_FILE_ERROR_TXTBSY")]
388 Txtbsy,
389 #[doc(alias = "G_FILE_ERROR_FAULT")]
390 Fault,
391 #[doc(alias = "G_FILE_ERROR_LOOP")]
392 Loop,
393 #[doc(alias = "G_FILE_ERROR_NOSPC")]
394 Nospc,
395 #[doc(alias = "G_FILE_ERROR_NOMEM")]
396 Nomem,
397 #[doc(alias = "G_FILE_ERROR_MFILE")]
398 Mfile,
399 #[doc(alias = "G_FILE_ERROR_NFILE")]
400 Nfile,
401 #[doc(alias = "G_FILE_ERROR_BADF")]
402 Badf,
403 #[doc(alias = "G_FILE_ERROR_INVAL")]
404 Inval,
405 #[doc(alias = "G_FILE_ERROR_PIPE")]
406 Pipe,
407 #[doc(alias = "G_FILE_ERROR_AGAIN")]
408 Again,
409 #[doc(alias = "G_FILE_ERROR_INTR")]
410 Intr,
411 #[doc(alias = "G_FILE_ERROR_IO")]
412 Io,
413 #[doc(alias = "G_FILE_ERROR_PERM")]
414 Perm,
415 #[doc(alias = "G_FILE_ERROR_NOSYS")]
416 Nosys,
417 #[doc(alias = "G_FILE_ERROR_FAILED")]
418 Failed,
419 #[doc(hidden)]
420 __Unknown(i32),
421}
422
423impl fmt::Display for FileError {
424 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
425 write!(
426 f,
427 "FileError::{}",
428 match *self {
429 Self::Exist => "Exist",
430 Self::Isdir => "Isdir",
431 Self::Acces => "Acces",
432 Self::Nametoolong => "Nametoolong",
433 Self::Noent => "Noent",
434 Self::Notdir => "Notdir",
435 Self::Nxio => "Nxio",
436 Self::Nodev => "Nodev",
437 Self::Rofs => "Rofs",
438 Self::Txtbsy => "Txtbsy",
439 Self::Fault => "Fault",
440 Self::Loop => "Loop",
441 Self::Nospc => "Nospc",
442 Self::Nomem => "Nomem",
443 Self::Mfile => "Mfile",
444 Self::Nfile => "Nfile",
445 Self::Badf => "Badf",
446 Self::Inval => "Inval",
447 Self::Pipe => "Pipe",
448 Self::Again => "Again",
449 Self::Intr => "Intr",
450 Self::Io => "Io",
451 Self::Perm => "Perm",
452 Self::Nosys => "Nosys",
453 Self::Failed => "Failed",
454 _ => "Unknown",
455 }
456 )
457 }
458}
459
460#[doc(hidden)]
461impl IntoGlib for FileError {
462 type GlibType = ffi::GFileError;
463
464 fn into_glib(self) -> ffi::GFileError {
465 match self {
466 Self::Exist => ffi::G_FILE_ERROR_EXIST,
467 Self::Isdir => ffi::G_FILE_ERROR_ISDIR,
468 Self::Acces => ffi::G_FILE_ERROR_ACCES,
469 Self::Nametoolong => ffi::G_FILE_ERROR_NAMETOOLONG,
470 Self::Noent => ffi::G_FILE_ERROR_NOENT,
471 Self::Notdir => ffi::G_FILE_ERROR_NOTDIR,
472 Self::Nxio => ffi::G_FILE_ERROR_NXIO,
473 Self::Nodev => ffi::G_FILE_ERROR_NODEV,
474 Self::Rofs => ffi::G_FILE_ERROR_ROFS,
475 Self::Txtbsy => ffi::G_FILE_ERROR_TXTBSY,
476 Self::Fault => ffi::G_FILE_ERROR_FAULT,
477 Self::Loop => ffi::G_FILE_ERROR_LOOP,
478 Self::Nospc => ffi::G_FILE_ERROR_NOSPC,
479 Self::Nomem => ffi::G_FILE_ERROR_NOMEM,
480 Self::Mfile => ffi::G_FILE_ERROR_MFILE,
481 Self::Nfile => ffi::G_FILE_ERROR_NFILE,
482 Self::Badf => ffi::G_FILE_ERROR_BADF,
483 Self::Inval => ffi::G_FILE_ERROR_INVAL,
484 Self::Pipe => ffi::G_FILE_ERROR_PIPE,
485 Self::Again => ffi::G_FILE_ERROR_AGAIN,
486 Self::Intr => ffi::G_FILE_ERROR_INTR,
487 Self::Io => ffi::G_FILE_ERROR_IO,
488 Self::Perm => ffi::G_FILE_ERROR_PERM,
489 Self::Nosys => ffi::G_FILE_ERROR_NOSYS,
490 Self::Failed => ffi::G_FILE_ERROR_FAILED,
491 Self::__Unknown(value) => value,
492 }
493 }
494}
495
496#[doc(hidden)]
497impl FromGlib<ffi::GFileError> for FileError {
498 unsafe fn from_glib(value: ffi::GFileError) -> Self {
499 match value {
500 ffi::G_FILE_ERROR_EXIST => Self::Exist,
501 ffi::G_FILE_ERROR_ISDIR => Self::Isdir,
502 ffi::G_FILE_ERROR_ACCES => Self::Acces,
503 ffi::G_FILE_ERROR_NAMETOOLONG => Self::Nametoolong,
504 ffi::G_FILE_ERROR_NOENT => Self::Noent,
505 ffi::G_FILE_ERROR_NOTDIR => Self::Notdir,
506 ffi::G_FILE_ERROR_NXIO => Self::Nxio,
507 ffi::G_FILE_ERROR_NODEV => Self::Nodev,
508 ffi::G_FILE_ERROR_ROFS => Self::Rofs,
509 ffi::G_FILE_ERROR_TXTBSY => Self::Txtbsy,
510 ffi::G_FILE_ERROR_FAULT => Self::Fault,
511 ffi::G_FILE_ERROR_LOOP => Self::Loop,
512 ffi::G_FILE_ERROR_NOSPC => Self::Nospc,
513 ffi::G_FILE_ERROR_NOMEM => Self::Nomem,
514 ffi::G_FILE_ERROR_MFILE => Self::Mfile,
515 ffi::G_FILE_ERROR_NFILE => Self::Nfile,
516 ffi::G_FILE_ERROR_BADF => Self::Badf,
517 ffi::G_FILE_ERROR_INVAL => Self::Inval,
518 ffi::G_FILE_ERROR_PIPE => Self::Pipe,
519 ffi::G_FILE_ERROR_AGAIN => Self::Again,
520 ffi::G_FILE_ERROR_INTR => Self::Intr,
521 ffi::G_FILE_ERROR_IO => Self::Io,
522 ffi::G_FILE_ERROR_PERM => Self::Perm,
523 ffi::G_FILE_ERROR_NOSYS => Self::Nosys,
524 ffi::G_FILE_ERROR_FAILED => Self::Failed,
525 value => Self::__Unknown(value),
526 }
527 }
528}
529
530impl crate::error::ErrorDomain for FileError {
531 #[inline]
532 fn domain() -> crate::Quark {
533 unsafe { from_glib(val:ffi::g_file_error_quark()) }
534 }
535
536 #[inline]
537 fn code(self) -> i32 {
538 self.into_glib()
539 }
540
541 #[inline]
542 #[allow(clippy::match_single_binding)]
543 fn from(code: i32) -> Option<Self> {
544 match unsafe { from_glib(val:code) } {
545 Self::__Unknown(_) => Some(Self::Failed),
546 value: FileError => Some(value),
547 }
548 }
549}
550
551#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
552#[non_exhaustive]
553#[doc(alias = "GKeyFileError")]
554pub enum KeyFileError {
555 #[doc(alias = "G_KEY_FILE_ERROR_UNKNOWN_ENCODING")]
556 UnknownEncoding,
557 #[doc(alias = "G_KEY_FILE_ERROR_PARSE")]
558 Parse,
559 #[doc(alias = "G_KEY_FILE_ERROR_NOT_FOUND")]
560 NotFound,
561 #[doc(alias = "G_KEY_FILE_ERROR_KEY_NOT_FOUND")]
562 KeyNotFound,
563 #[doc(alias = "G_KEY_FILE_ERROR_GROUP_NOT_FOUND")]
564 GroupNotFound,
565 #[doc(alias = "G_KEY_FILE_ERROR_INVALID_VALUE")]
566 InvalidValue,
567 #[doc(hidden)]
568 __Unknown(i32),
569}
570
571impl fmt::Display for KeyFileError {
572 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
573 write!(
574 f,
575 "KeyFileError::{}",
576 match *self {
577 Self::UnknownEncoding => "UnknownEncoding",
578 Self::Parse => "Parse",
579 Self::NotFound => "NotFound",
580 Self::KeyNotFound => "KeyNotFound",
581 Self::GroupNotFound => "GroupNotFound",
582 Self::InvalidValue => "InvalidValue",
583 _ => "Unknown",
584 }
585 )
586 }
587}
588
589#[doc(hidden)]
590impl IntoGlib for KeyFileError {
591 type GlibType = ffi::GKeyFileError;
592
593 #[inline]
594 fn into_glib(self) -> ffi::GKeyFileError {
595 match self {
596 Self::UnknownEncoding => ffi::G_KEY_FILE_ERROR_UNKNOWN_ENCODING,
597 Self::Parse => ffi::G_KEY_FILE_ERROR_PARSE,
598 Self::NotFound => ffi::G_KEY_FILE_ERROR_NOT_FOUND,
599 Self::KeyNotFound => ffi::G_KEY_FILE_ERROR_KEY_NOT_FOUND,
600 Self::GroupNotFound => ffi::G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
601 Self::InvalidValue => ffi::G_KEY_FILE_ERROR_INVALID_VALUE,
602 Self::__Unknown(value: i32) => value,
603 }
604 }
605}
606
607#[doc(hidden)]
608impl FromGlib<ffi::GKeyFileError> for KeyFileError {
609 #[inline]
610 unsafe fn from_glib(value: ffi::GKeyFileError) -> Self {
611 match value {
612 ffi::G_KEY_FILE_ERROR_UNKNOWN_ENCODING => Self::UnknownEncoding,
613 ffi::G_KEY_FILE_ERROR_PARSE => Self::Parse,
614 ffi::G_KEY_FILE_ERROR_NOT_FOUND => Self::NotFound,
615 ffi::G_KEY_FILE_ERROR_KEY_NOT_FOUND => Self::KeyNotFound,
616 ffi::G_KEY_FILE_ERROR_GROUP_NOT_FOUND => Self::GroupNotFound,
617 ffi::G_KEY_FILE_ERROR_INVALID_VALUE => Self::InvalidValue,
618 value: i32 => Self::__Unknown(value),
619 }
620 }
621}
622
623impl crate::error::ErrorDomain for KeyFileError {
624 #[inline]
625 fn domain() -> crate::Quark {
626 unsafe { from_glib(val:ffi::g_key_file_error_quark()) }
627 }
628
629 #[inline]
630 fn code(self) -> i32 {
631 self.into_glib()
632 }
633
634 #[inline]
635 #[allow(clippy::match_single_binding)]
636 fn from(code: i32) -> Option<Self> {
637 match unsafe { from_glib(val:code) } {
638 value: KeyFileError => Some(value),
639 }
640 }
641}
642
643#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
644#[non_exhaustive]
645#[doc(alias = "GLogWriterOutput")]
646pub enum LogWriterOutput {
647 #[doc(alias = "G_LOG_WRITER_HANDLED")]
648 Handled,
649 #[doc(alias = "G_LOG_WRITER_UNHANDLED")]
650 Unhandled,
651 #[doc(hidden)]
652 __Unknown(i32),
653}
654
655impl fmt::Display for LogWriterOutput {
656 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
657 write!(
658 f,
659 "LogWriterOutput::{}",
660 match *self {
661 Self::Handled => "Handled",
662 Self::Unhandled => "Unhandled",
663 _ => "Unknown",
664 }
665 )
666 }
667}
668
669#[doc(hidden)]
670impl IntoGlib for LogWriterOutput {
671 type GlibType = ffi::GLogWriterOutput;
672
673 #[inline]
674 fn into_glib(self) -> ffi::GLogWriterOutput {
675 match self {
676 Self::Handled => ffi::G_LOG_WRITER_HANDLED,
677 Self::Unhandled => ffi::G_LOG_WRITER_UNHANDLED,
678 Self::__Unknown(value: i32) => value,
679 }
680 }
681}
682
683#[doc(hidden)]
684impl FromGlib<ffi::GLogWriterOutput> for LogWriterOutput {
685 #[inline]
686 unsafe fn from_glib(value: ffi::GLogWriterOutput) -> Self {
687 match value {
688 ffi::G_LOG_WRITER_HANDLED => Self::Handled,
689 ffi::G_LOG_WRITER_UNHANDLED => Self::Unhandled,
690 value: i32 => Self::__Unknown(value),
691 }
692 }
693}
694
695#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
696#[non_exhaustive]
697#[doc(alias = "GMarkupError")]
698pub enum MarkupError {
699 #[doc(alias = "G_MARKUP_ERROR_BAD_UTF8")]
700 BadUtf8,
701 #[doc(alias = "G_MARKUP_ERROR_EMPTY")]
702 Empty,
703 #[doc(alias = "G_MARKUP_ERROR_PARSE")]
704 Parse,
705 #[doc(alias = "G_MARKUP_ERROR_UNKNOWN_ELEMENT")]
706 UnknownElement,
707 #[doc(alias = "G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE")]
708 UnknownAttribute,
709 #[doc(alias = "G_MARKUP_ERROR_INVALID_CONTENT")]
710 InvalidContent,
711 #[doc(alias = "G_MARKUP_ERROR_MISSING_ATTRIBUTE")]
712 MissingAttribute,
713 #[doc(hidden)]
714 __Unknown(i32),
715}
716
717impl fmt::Display for MarkupError {
718 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
719 write!(
720 f,
721 "MarkupError::{}",
722 match *self {
723 Self::BadUtf8 => "BadUtf8",
724 Self::Empty => "Empty",
725 Self::Parse => "Parse",
726 Self::UnknownElement => "UnknownElement",
727 Self::UnknownAttribute => "UnknownAttribute",
728 Self::InvalidContent => "InvalidContent",
729 Self::MissingAttribute => "MissingAttribute",
730 _ => "Unknown",
731 }
732 )
733 }
734}
735
736#[doc(hidden)]
737impl IntoGlib for MarkupError {
738 type GlibType = ffi::GMarkupError;
739
740 #[inline]
741 fn into_glib(self) -> ffi::GMarkupError {
742 match self {
743 Self::BadUtf8 => ffi::G_MARKUP_ERROR_BAD_UTF8,
744 Self::Empty => ffi::G_MARKUP_ERROR_EMPTY,
745 Self::Parse => ffi::G_MARKUP_ERROR_PARSE,
746 Self::UnknownElement => ffi::G_MARKUP_ERROR_UNKNOWN_ELEMENT,
747 Self::UnknownAttribute => ffi::G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
748 Self::InvalidContent => ffi::G_MARKUP_ERROR_INVALID_CONTENT,
749 Self::MissingAttribute => ffi::G_MARKUP_ERROR_MISSING_ATTRIBUTE,
750 Self::__Unknown(value: i32) => value,
751 }
752 }
753}
754
755#[doc(hidden)]
756impl FromGlib<ffi::GMarkupError> for MarkupError {
757 #[inline]
758 unsafe fn from_glib(value: ffi::GMarkupError) -> Self {
759 match value {
760 ffi::G_MARKUP_ERROR_BAD_UTF8 => Self::BadUtf8,
761 ffi::G_MARKUP_ERROR_EMPTY => Self::Empty,
762 ffi::G_MARKUP_ERROR_PARSE => Self::Parse,
763 ffi::G_MARKUP_ERROR_UNKNOWN_ELEMENT => Self::UnknownElement,
764 ffi::G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE => Self::UnknownAttribute,
765 ffi::G_MARKUP_ERROR_INVALID_CONTENT => Self::InvalidContent,
766 ffi::G_MARKUP_ERROR_MISSING_ATTRIBUTE => Self::MissingAttribute,
767 value: i32 => Self::__Unknown(value),
768 }
769 }
770}
771
772impl crate::error::ErrorDomain for MarkupError {
773 #[inline]
774 fn domain() -> crate::Quark {
775 unsafe { from_glib(val:ffi::g_markup_error_quark()) }
776 }
777
778 #[inline]
779 fn code(self) -> i32 {
780 self.into_glib()
781 }
782
783 #[inline]
784 #[allow(clippy::match_single_binding)]
785 fn from(code: i32) -> Option<Self> {
786 match unsafe { from_glib(val:code) } {
787 value: MarkupError => Some(value),
788 }
789 }
790}
791
792#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
793#[non_exhaustive]
794#[doc(alias = "GNormalizeMode")]
795pub enum NormalizeMode {
796 #[doc(alias = "G_NORMALIZE_DEFAULT")]
797 Default,
798 #[doc(alias = "G_NORMALIZE_DEFAULT_COMPOSE")]
799 DefaultCompose,
800 #[doc(alias = "G_NORMALIZE_ALL")]
801 All,
802 #[doc(alias = "G_NORMALIZE_ALL_COMPOSE")]
803 AllCompose,
804 #[doc(hidden)]
805 __Unknown(i32),
806}
807
808impl fmt::Display for NormalizeMode {
809 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
810 write!(
811 f,
812 "NormalizeMode::{}",
813 match *self {
814 Self::Default => "Default",
815 Self::DefaultCompose => "DefaultCompose",
816 Self::All => "All",
817 Self::AllCompose => "AllCompose",
818 _ => "Unknown",
819 }
820 )
821 }
822}
823
824#[doc(hidden)]
825impl IntoGlib for NormalizeMode {
826 type GlibType = ffi::GNormalizeMode;
827
828 #[inline]
829 fn into_glib(self) -> ffi::GNormalizeMode {
830 match self {
831 Self::Default => ffi::G_NORMALIZE_DEFAULT,
832 Self::DefaultCompose => ffi::G_NORMALIZE_DEFAULT_COMPOSE,
833 Self::All => ffi::G_NORMALIZE_ALL,
834 Self::AllCompose => ffi::G_NORMALIZE_ALL_COMPOSE,
835 Self::__Unknown(value: i32) => value,
836 }
837 }
838}
839
840#[doc(hidden)]
841impl FromGlib<ffi::GNormalizeMode> for NormalizeMode {
842 #[inline]
843 unsafe fn from_glib(value: ffi::GNormalizeMode) -> Self {
844 match value {
845 ffi::G_NORMALIZE_DEFAULT => Self::Default,
846 ffi::G_NORMALIZE_DEFAULT_COMPOSE => Self::DefaultCompose,
847 ffi::G_NORMALIZE_ALL => Self::All,
848 ffi::G_NORMALIZE_ALL_COMPOSE => Self::AllCompose,
849 value: i32 => Self::__Unknown(value),
850 }
851 }
852}
853
854#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
855#[non_exhaustive]
856#[doc(alias = "GOptionArg")]
857pub enum OptionArg {
858 #[doc(alias = "G_OPTION_ARG_NONE")]
859 None,
860 #[doc(alias = "G_OPTION_ARG_STRING")]
861 String,
862 #[doc(alias = "G_OPTION_ARG_INT")]
863 Int,
864 #[doc(alias = "G_OPTION_ARG_CALLBACK")]
865 Callback,
866 #[doc(alias = "G_OPTION_ARG_FILENAME")]
867 Filename,
868 #[doc(alias = "G_OPTION_ARG_STRING_ARRAY")]
869 StringArray,
870 #[doc(alias = "G_OPTION_ARG_FILENAME_ARRAY")]
871 FilenameArray,
872 #[doc(alias = "G_OPTION_ARG_DOUBLE")]
873 Double,
874 #[doc(alias = "G_OPTION_ARG_INT64")]
875 Int64,
876 #[doc(hidden)]
877 __Unknown(i32),
878}
879
880impl fmt::Display for OptionArg {
881 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
882 write!(
883 f,
884 "OptionArg::{}",
885 match *self {
886 Self::None => "None",
887 Self::String => "String",
888 Self::Int => "Int",
889 Self::Callback => "Callback",
890 Self::Filename => "Filename",
891 Self::StringArray => "StringArray",
892 Self::FilenameArray => "FilenameArray",
893 Self::Double => "Double",
894 Self::Int64 => "Int64",
895 _ => "Unknown",
896 }
897 )
898 }
899}
900
901#[doc(hidden)]
902impl IntoGlib for OptionArg {
903 type GlibType = ffi::GOptionArg;
904
905 #[inline]
906 fn into_glib(self) -> ffi::GOptionArg {
907 match self {
908 Self::None => ffi::G_OPTION_ARG_NONE,
909 Self::String => ffi::G_OPTION_ARG_STRING,
910 Self::Int => ffi::G_OPTION_ARG_INT,
911 Self::Callback => ffi::G_OPTION_ARG_CALLBACK,
912 Self::Filename => ffi::G_OPTION_ARG_FILENAME,
913 Self::StringArray => ffi::G_OPTION_ARG_STRING_ARRAY,
914 Self::FilenameArray => ffi::G_OPTION_ARG_FILENAME_ARRAY,
915 Self::Double => ffi::G_OPTION_ARG_DOUBLE,
916 Self::Int64 => ffi::G_OPTION_ARG_INT64,
917 Self::__Unknown(value: i32) => value,
918 }
919 }
920}
921
922#[doc(hidden)]
923impl FromGlib<ffi::GOptionArg> for OptionArg {
924 #[inline]
925 unsafe fn from_glib(value: ffi::GOptionArg) -> Self {
926 match value {
927 ffi::G_OPTION_ARG_NONE => Self::None,
928 ffi::G_OPTION_ARG_STRING => Self::String,
929 ffi::G_OPTION_ARG_INT => Self::Int,
930 ffi::G_OPTION_ARG_CALLBACK => Self::Callback,
931 ffi::G_OPTION_ARG_FILENAME => Self::Filename,
932 ffi::G_OPTION_ARG_STRING_ARRAY => Self::StringArray,
933 ffi::G_OPTION_ARG_FILENAME_ARRAY => Self::FilenameArray,
934 ffi::G_OPTION_ARG_DOUBLE => Self::Double,
935 ffi::G_OPTION_ARG_INT64 => Self::Int64,
936 value: i32 => Self::__Unknown(value),
937 }
938 }
939}
940
941#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
942#[non_exhaustive]
943#[doc(alias = "GSeekType")]
944pub enum SeekType {
945 #[doc(alias = "G_SEEK_CUR")]
946 Cur,
947 #[doc(alias = "G_SEEK_SET")]
948 Set,
949 #[doc(alias = "G_SEEK_END")]
950 End,
951 #[doc(hidden)]
952 __Unknown(i32),
953}
954
955impl fmt::Display for SeekType {
956 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
957 write!(
958 f,
959 "SeekType::{}",
960 match *self {
961 Self::Cur => "Cur",
962 Self::Set => "Set",
963 Self::End => "End",
964 _ => "Unknown",
965 }
966 )
967 }
968}
969
970#[doc(hidden)]
971impl IntoGlib for SeekType {
972 type GlibType = ffi::GSeekType;
973
974 #[inline]
975 fn into_glib(self) -> ffi::GSeekType {
976 match self {
977 Self::Cur => ffi::G_SEEK_CUR,
978 Self::Set => ffi::G_SEEK_SET,
979 Self::End => ffi::G_SEEK_END,
980 Self::__Unknown(value: i32) => value,
981 }
982 }
983}
984
985#[doc(hidden)]
986impl FromGlib<ffi::GSeekType> for SeekType {
987 #[inline]
988 unsafe fn from_glib(value: ffi::GSeekType) -> Self {
989 match value {
990 ffi::G_SEEK_CUR => Self::Cur,
991 ffi::G_SEEK_SET => Self::Set,
992 ffi::G_SEEK_END => Self::End,
993 value: i32 => Self::__Unknown(value),
994 }
995 }
996}
997
998#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
999#[non_exhaustive]
1000#[doc(alias = "GTimeType")]
1001pub enum TimeType {
1002 #[doc(alias = "G_TIME_TYPE_STANDARD")]
1003 Standard,
1004 #[doc(alias = "G_TIME_TYPE_DAYLIGHT")]
1005 Daylight,
1006 #[doc(alias = "G_TIME_TYPE_UNIVERSAL")]
1007 Universal,
1008 #[doc(hidden)]
1009 __Unknown(i32),
1010}
1011
1012impl fmt::Display for TimeType {
1013 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1014 write!(
1015 f,
1016 "TimeType::{}",
1017 match *self {
1018 Self::Standard => "Standard",
1019 Self::Daylight => "Daylight",
1020 Self::Universal => "Universal",
1021 _ => "Unknown",
1022 }
1023 )
1024 }
1025}
1026
1027#[doc(hidden)]
1028impl IntoGlib for TimeType {
1029 type GlibType = ffi::GTimeType;
1030
1031 #[inline]
1032 fn into_glib(self) -> ffi::GTimeType {
1033 match self {
1034 Self::Standard => ffi::G_TIME_TYPE_STANDARD,
1035 Self::Daylight => ffi::G_TIME_TYPE_DAYLIGHT,
1036 Self::Universal => ffi::G_TIME_TYPE_UNIVERSAL,
1037 Self::__Unknown(value: i32) => value,
1038 }
1039 }
1040}
1041
1042#[doc(hidden)]
1043impl FromGlib<ffi::GTimeType> for TimeType {
1044 #[inline]
1045 unsafe fn from_glib(value: ffi::GTimeType) -> Self {
1046 match value {
1047 ffi::G_TIME_TYPE_STANDARD => Self::Standard,
1048 ffi::G_TIME_TYPE_DAYLIGHT => Self::Daylight,
1049 ffi::G_TIME_TYPE_UNIVERSAL => Self::Universal,
1050 value: i32 => Self::__Unknown(value),
1051 }
1052 }
1053}
1054
1055#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1056#[non_exhaustive]
1057#[doc(alias = "GUnicodeBreakType")]
1058pub enum UnicodeBreakType {
1059 #[doc(alias = "G_UNICODE_BREAK_MANDATORY")]
1060 Mandatory,
1061 #[doc(alias = "G_UNICODE_BREAK_CARRIAGE_RETURN")]
1062 CarriageReturn,
1063 #[doc(alias = "G_UNICODE_BREAK_LINE_FEED")]
1064 LineFeed,
1065 #[doc(alias = "G_UNICODE_BREAK_COMBINING_MARK")]
1066 CombiningMark,
1067 #[doc(alias = "G_UNICODE_BREAK_SURROGATE")]
1068 Surrogate,
1069 #[doc(alias = "G_UNICODE_BREAK_ZERO_WIDTH_SPACE")]
1070 ZeroWidthSpace,
1071 #[doc(alias = "G_UNICODE_BREAK_INSEPARABLE")]
1072 Inseparable,
1073 #[doc(alias = "G_UNICODE_BREAK_NON_BREAKING_GLUE")]
1074 NonBreakingGlue,
1075 #[doc(alias = "G_UNICODE_BREAK_CONTINGENT")]
1076 Contingent,
1077 #[doc(alias = "G_UNICODE_BREAK_SPACE")]
1078 Space,
1079 #[doc(alias = "G_UNICODE_BREAK_AFTER")]
1080 After,
1081 #[doc(alias = "G_UNICODE_BREAK_BEFORE")]
1082 Before,
1083 #[doc(alias = "G_UNICODE_BREAK_BEFORE_AND_AFTER")]
1084 BeforeAndAfter,
1085 #[doc(alias = "G_UNICODE_BREAK_HYPHEN")]
1086 Hyphen,
1087 #[doc(alias = "G_UNICODE_BREAK_NON_STARTER")]
1088 NonStarter,
1089 #[doc(alias = "G_UNICODE_BREAK_OPEN_PUNCTUATION")]
1090 OpenPunctuation,
1091 #[doc(alias = "G_UNICODE_BREAK_CLOSE_PUNCTUATION")]
1092 ClosePunctuation,
1093 #[doc(alias = "G_UNICODE_BREAK_QUOTATION")]
1094 Quotation,
1095 #[doc(alias = "G_UNICODE_BREAK_EXCLAMATION")]
1096 Exclamation,
1097 #[doc(alias = "G_UNICODE_BREAK_IDEOGRAPHIC")]
1098 Ideographic,
1099 #[doc(alias = "G_UNICODE_BREAK_NUMERIC")]
1100 Numeric,
1101 #[doc(alias = "G_UNICODE_BREAK_INFIX_SEPARATOR")]
1102 InfixSeparator,
1103 #[doc(alias = "G_UNICODE_BREAK_SYMBOL")]
1104 Symbol,
1105 #[doc(alias = "G_UNICODE_BREAK_ALPHABETIC")]
1106 Alphabetic,
1107 #[doc(alias = "G_UNICODE_BREAK_PREFIX")]
1108 Prefix,
1109 #[doc(alias = "G_UNICODE_BREAK_POSTFIX")]
1110 Postfix,
1111 #[doc(alias = "G_UNICODE_BREAK_COMPLEX_CONTEXT")]
1112 ComplexContext,
1113 #[doc(alias = "G_UNICODE_BREAK_AMBIGUOUS")]
1114 Ambiguous,
1115 #[doc(alias = "G_UNICODE_BREAK_UNKNOWN")]
1116 Unknown,
1117 #[doc(alias = "G_UNICODE_BREAK_NEXT_LINE")]
1118 NextLine,
1119 #[doc(alias = "G_UNICODE_BREAK_WORD_JOINER")]
1120 WordJoiner,
1121 #[doc(alias = "G_UNICODE_BREAK_HANGUL_L_JAMO")]
1122 HangulLJamo,
1123 #[doc(alias = "G_UNICODE_BREAK_HANGUL_V_JAMO")]
1124 HangulVJamo,
1125 #[doc(alias = "G_UNICODE_BREAK_HANGUL_T_JAMO")]
1126 HangulTJamo,
1127 #[doc(alias = "G_UNICODE_BREAK_HANGUL_LV_SYLLABLE")]
1128 HangulLvSyllable,
1129 #[doc(alias = "G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE")]
1130 HangulLvtSyllable,
1131 #[doc(alias = "G_UNICODE_BREAK_CLOSE_PARENTHESIS")]
1132 CloseParenthesis,
1133 #[doc(alias = "G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER")]
1134 ConditionalJapaneseStarter,
1135 #[doc(alias = "G_UNICODE_BREAK_HEBREW_LETTER")]
1136 HebrewLetter,
1137 #[doc(alias = "G_UNICODE_BREAK_REGIONAL_INDICATOR")]
1138 RegionalIndicator,
1139 #[doc(alias = "G_UNICODE_BREAK_EMOJI_BASE")]
1140 EmojiBase,
1141 #[doc(alias = "G_UNICODE_BREAK_EMOJI_MODIFIER")]
1142 EmojiModifier,
1143 #[doc(alias = "G_UNICODE_BREAK_ZERO_WIDTH_JOINER")]
1144 ZeroWidthJoiner,
1145 #[doc(hidden)]
1146 __Unknown(i32),
1147}
1148
1149impl fmt::Display for UnicodeBreakType {
1150 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1151 write!(
1152 f,
1153 "UnicodeBreakType::{}",
1154 match *self {
1155 Self::Mandatory => "Mandatory",
1156 Self::CarriageReturn => "CarriageReturn",
1157 Self::LineFeed => "LineFeed",
1158 Self::CombiningMark => "CombiningMark",
1159 Self::Surrogate => "Surrogate",
1160 Self::ZeroWidthSpace => "ZeroWidthSpace",
1161 Self::Inseparable => "Inseparable",
1162 Self::NonBreakingGlue => "NonBreakingGlue",
1163 Self::Contingent => "Contingent",
1164 Self::Space => "Space",
1165 Self::After => "After",
1166 Self::Before => "Before",
1167 Self::BeforeAndAfter => "BeforeAndAfter",
1168 Self::Hyphen => "Hyphen",
1169 Self::NonStarter => "NonStarter",
1170 Self::OpenPunctuation => "OpenPunctuation",
1171 Self::ClosePunctuation => "ClosePunctuation",
1172 Self::Quotation => "Quotation",
1173 Self::Exclamation => "Exclamation",
1174 Self::Ideographic => "Ideographic",
1175 Self::Numeric => "Numeric",
1176 Self::InfixSeparator => "InfixSeparator",
1177 Self::Symbol => "Symbol",
1178 Self::Alphabetic => "Alphabetic",
1179 Self::Prefix => "Prefix",
1180 Self::Postfix => "Postfix",
1181 Self::ComplexContext => "ComplexContext",
1182 Self::Ambiguous => "Ambiguous",
1183 Self::Unknown => "Unknown",
1184 Self::NextLine => "NextLine",
1185 Self::WordJoiner => "WordJoiner",
1186 Self::HangulLJamo => "HangulLJamo",
1187 Self::HangulVJamo => "HangulVJamo",
1188 Self::HangulTJamo => "HangulTJamo",
1189 Self::HangulLvSyllable => "HangulLvSyllable",
1190 Self::HangulLvtSyllable => "HangulLvtSyllable",
1191 Self::CloseParenthesis => "CloseParenthesis",
1192 Self::ConditionalJapaneseStarter => "ConditionalJapaneseStarter",
1193 Self::HebrewLetter => "HebrewLetter",
1194 Self::RegionalIndicator => "RegionalIndicator",
1195 Self::EmojiBase => "EmojiBase",
1196 Self::EmojiModifier => "EmojiModifier",
1197 Self::ZeroWidthJoiner => "ZeroWidthJoiner",
1198 _ => "Unknown",
1199 }
1200 )
1201 }
1202}
1203
1204#[doc(hidden)]
1205impl IntoGlib for UnicodeBreakType {
1206 type GlibType = ffi::GUnicodeBreakType;
1207
1208 fn into_glib(self) -> ffi::GUnicodeBreakType {
1209 match self {
1210 Self::Mandatory => ffi::G_UNICODE_BREAK_MANDATORY,
1211 Self::CarriageReturn => ffi::G_UNICODE_BREAK_CARRIAGE_RETURN,
1212 Self::LineFeed => ffi::G_UNICODE_BREAK_LINE_FEED,
1213 Self::CombiningMark => ffi::G_UNICODE_BREAK_COMBINING_MARK,
1214 Self::Surrogate => ffi::G_UNICODE_BREAK_SURROGATE,
1215 Self::ZeroWidthSpace => ffi::G_UNICODE_BREAK_ZERO_WIDTH_SPACE,
1216 Self::Inseparable => ffi::G_UNICODE_BREAK_INSEPARABLE,
1217 Self::NonBreakingGlue => ffi::G_UNICODE_BREAK_NON_BREAKING_GLUE,
1218 Self::Contingent => ffi::G_UNICODE_BREAK_CONTINGENT,
1219 Self::Space => ffi::G_UNICODE_BREAK_SPACE,
1220 Self::After => ffi::G_UNICODE_BREAK_AFTER,
1221 Self::Before => ffi::G_UNICODE_BREAK_BEFORE,
1222 Self::BeforeAndAfter => ffi::G_UNICODE_BREAK_BEFORE_AND_AFTER,
1223 Self::Hyphen => ffi::G_UNICODE_BREAK_HYPHEN,
1224 Self::NonStarter => ffi::G_UNICODE_BREAK_NON_STARTER,
1225 Self::OpenPunctuation => ffi::G_UNICODE_BREAK_OPEN_PUNCTUATION,
1226 Self::ClosePunctuation => ffi::G_UNICODE_BREAK_CLOSE_PUNCTUATION,
1227 Self::Quotation => ffi::G_UNICODE_BREAK_QUOTATION,
1228 Self::Exclamation => ffi::G_UNICODE_BREAK_EXCLAMATION,
1229 Self::Ideographic => ffi::G_UNICODE_BREAK_IDEOGRAPHIC,
1230 Self::Numeric => ffi::G_UNICODE_BREAK_NUMERIC,
1231 Self::InfixSeparator => ffi::G_UNICODE_BREAK_INFIX_SEPARATOR,
1232 Self::Symbol => ffi::G_UNICODE_BREAK_SYMBOL,
1233 Self::Alphabetic => ffi::G_UNICODE_BREAK_ALPHABETIC,
1234 Self::Prefix => ffi::G_UNICODE_BREAK_PREFIX,
1235 Self::Postfix => ffi::G_UNICODE_BREAK_POSTFIX,
1236 Self::ComplexContext => ffi::G_UNICODE_BREAK_COMPLEX_CONTEXT,
1237 Self::Ambiguous => ffi::G_UNICODE_BREAK_AMBIGUOUS,
1238 Self::Unknown => ffi::G_UNICODE_BREAK_UNKNOWN,
1239 Self::NextLine => ffi::G_UNICODE_BREAK_NEXT_LINE,
1240 Self::WordJoiner => ffi::G_UNICODE_BREAK_WORD_JOINER,
1241 Self::HangulLJamo => ffi::G_UNICODE_BREAK_HANGUL_L_JAMO,
1242 Self::HangulVJamo => ffi::G_UNICODE_BREAK_HANGUL_V_JAMO,
1243 Self::HangulTJamo => ffi::G_UNICODE_BREAK_HANGUL_T_JAMO,
1244 Self::HangulLvSyllable => ffi::G_UNICODE_BREAK_HANGUL_LV_SYLLABLE,
1245 Self::HangulLvtSyllable => ffi::G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE,
1246 Self::CloseParenthesis => ffi::G_UNICODE_BREAK_CLOSE_PARENTHESIS,
1247 Self::ConditionalJapaneseStarter => ffi::G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER,
1248 Self::HebrewLetter => ffi::G_UNICODE_BREAK_HEBREW_LETTER,
1249 Self::RegionalIndicator => ffi::G_UNICODE_BREAK_REGIONAL_INDICATOR,
1250 Self::EmojiBase => ffi::G_UNICODE_BREAK_EMOJI_BASE,
1251 Self::EmojiModifier => ffi::G_UNICODE_BREAK_EMOJI_MODIFIER,
1252 Self::ZeroWidthJoiner => ffi::G_UNICODE_BREAK_ZERO_WIDTH_JOINER,
1253 Self::__Unknown(value) => value,
1254 }
1255 }
1256}
1257
1258#[doc(hidden)]
1259impl FromGlib<ffi::GUnicodeBreakType> for UnicodeBreakType {
1260 unsafe fn from_glib(value: ffi::GUnicodeBreakType) -> Self {
1261 match value {
1262 ffi::G_UNICODE_BREAK_MANDATORY => Self::Mandatory,
1263 ffi::G_UNICODE_BREAK_CARRIAGE_RETURN => Self::CarriageReturn,
1264 ffi::G_UNICODE_BREAK_LINE_FEED => Self::LineFeed,
1265 ffi::G_UNICODE_BREAK_COMBINING_MARK => Self::CombiningMark,
1266 ffi::G_UNICODE_BREAK_SURROGATE => Self::Surrogate,
1267 ffi::G_UNICODE_BREAK_ZERO_WIDTH_SPACE => Self::ZeroWidthSpace,
1268 ffi::G_UNICODE_BREAK_INSEPARABLE => Self::Inseparable,
1269 ffi::G_UNICODE_BREAK_NON_BREAKING_GLUE => Self::NonBreakingGlue,
1270 ffi::G_UNICODE_BREAK_CONTINGENT => Self::Contingent,
1271 ffi::G_UNICODE_BREAK_SPACE => Self::Space,
1272 ffi::G_UNICODE_BREAK_AFTER => Self::After,
1273 ffi::G_UNICODE_BREAK_BEFORE => Self::Before,
1274 ffi::G_UNICODE_BREAK_BEFORE_AND_AFTER => Self::BeforeAndAfter,
1275 ffi::G_UNICODE_BREAK_HYPHEN => Self::Hyphen,
1276 ffi::G_UNICODE_BREAK_NON_STARTER => Self::NonStarter,
1277 ffi::G_UNICODE_BREAK_OPEN_PUNCTUATION => Self::OpenPunctuation,
1278 ffi::G_UNICODE_BREAK_CLOSE_PUNCTUATION => Self::ClosePunctuation,
1279 ffi::G_UNICODE_BREAK_QUOTATION => Self::Quotation,
1280 ffi::G_UNICODE_BREAK_EXCLAMATION => Self::Exclamation,
1281 ffi::G_UNICODE_BREAK_IDEOGRAPHIC => Self::Ideographic,
1282 ffi::G_UNICODE_BREAK_NUMERIC => Self::Numeric,
1283 ffi::G_UNICODE_BREAK_INFIX_SEPARATOR => Self::InfixSeparator,
1284 ffi::G_UNICODE_BREAK_SYMBOL => Self::Symbol,
1285 ffi::G_UNICODE_BREAK_ALPHABETIC => Self::Alphabetic,
1286 ffi::G_UNICODE_BREAK_PREFIX => Self::Prefix,
1287 ffi::G_UNICODE_BREAK_POSTFIX => Self::Postfix,
1288 ffi::G_UNICODE_BREAK_COMPLEX_CONTEXT => Self::ComplexContext,
1289 ffi::G_UNICODE_BREAK_AMBIGUOUS => Self::Ambiguous,
1290 ffi::G_UNICODE_BREAK_UNKNOWN => Self::Unknown,
1291 ffi::G_UNICODE_BREAK_NEXT_LINE => Self::NextLine,
1292 ffi::G_UNICODE_BREAK_WORD_JOINER => Self::WordJoiner,
1293 ffi::G_UNICODE_BREAK_HANGUL_L_JAMO => Self::HangulLJamo,
1294 ffi::G_UNICODE_BREAK_HANGUL_V_JAMO => Self::HangulVJamo,
1295 ffi::G_UNICODE_BREAK_HANGUL_T_JAMO => Self::HangulTJamo,
1296 ffi::G_UNICODE_BREAK_HANGUL_LV_SYLLABLE => Self::HangulLvSyllable,
1297 ffi::G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE => Self::HangulLvtSyllable,
1298 ffi::G_UNICODE_BREAK_CLOSE_PARENTHESIS => Self::CloseParenthesis,
1299 ffi::G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER => Self::ConditionalJapaneseStarter,
1300 ffi::G_UNICODE_BREAK_HEBREW_LETTER => Self::HebrewLetter,
1301 ffi::G_UNICODE_BREAK_REGIONAL_INDICATOR => Self::RegionalIndicator,
1302 ffi::G_UNICODE_BREAK_EMOJI_BASE => Self::EmojiBase,
1303 ffi::G_UNICODE_BREAK_EMOJI_MODIFIER => Self::EmojiModifier,
1304 ffi::G_UNICODE_BREAK_ZERO_WIDTH_JOINER => Self::ZeroWidthJoiner,
1305 value => Self::__Unknown(value),
1306 }
1307 }
1308}
1309
1310#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1311#[non_exhaustive]
1312#[doc(alias = "GUnicodeScript")]
1313pub enum UnicodeScript {
1314 #[doc(alias = "G_UNICODE_SCRIPT_INVALID_CODE")]
1315 InvalidCode,
1316 #[doc(alias = "G_UNICODE_SCRIPT_COMMON")]
1317 Common,
1318 #[doc(alias = "G_UNICODE_SCRIPT_INHERITED")]
1319 Inherited,
1320 #[doc(alias = "G_UNICODE_SCRIPT_ARABIC")]
1321 Arabic,
1322 #[doc(alias = "G_UNICODE_SCRIPT_ARMENIAN")]
1323 Armenian,
1324 #[doc(alias = "G_UNICODE_SCRIPT_BENGALI")]
1325 Bengali,
1326 #[doc(alias = "G_UNICODE_SCRIPT_BOPOMOFO")]
1327 Bopomofo,
1328 #[doc(alias = "G_UNICODE_SCRIPT_CHEROKEE")]
1329 Cherokee,
1330 #[doc(alias = "G_UNICODE_SCRIPT_COPTIC")]
1331 Coptic,
1332 #[doc(alias = "G_UNICODE_SCRIPT_CYRILLIC")]
1333 Cyrillic,
1334 #[doc(alias = "G_UNICODE_SCRIPT_DESERET")]
1335 Deseret,
1336 #[doc(alias = "G_UNICODE_SCRIPT_DEVANAGARI")]
1337 Devanagari,
1338 #[doc(alias = "G_UNICODE_SCRIPT_ETHIOPIC")]
1339 Ethiopic,
1340 #[doc(alias = "G_UNICODE_SCRIPT_GEORGIAN")]
1341 Georgian,
1342 #[doc(alias = "G_UNICODE_SCRIPT_GOTHIC")]
1343 Gothic,
1344 #[doc(alias = "G_UNICODE_SCRIPT_GREEK")]
1345 Greek,
1346 #[doc(alias = "G_UNICODE_SCRIPT_GUJARATI")]
1347 Gujarati,
1348 #[doc(alias = "G_UNICODE_SCRIPT_GURMUKHI")]
1349 Gurmukhi,
1350 #[doc(alias = "G_UNICODE_SCRIPT_HAN")]
1351 Han,
1352 #[doc(alias = "G_UNICODE_SCRIPT_HANGUL")]
1353 Hangul,
1354 #[doc(alias = "G_UNICODE_SCRIPT_HEBREW")]
1355 Hebrew,
1356 #[doc(alias = "G_UNICODE_SCRIPT_HIRAGANA")]
1357 Hiragana,
1358 #[doc(alias = "G_UNICODE_SCRIPT_KANNADA")]
1359 Kannada,
1360 #[doc(alias = "G_UNICODE_SCRIPT_KATAKANA")]
1361 Katakana,
1362 #[doc(alias = "G_UNICODE_SCRIPT_KHMER")]
1363 Khmer,
1364 #[doc(alias = "G_UNICODE_SCRIPT_LAO")]
1365 Lao,
1366 #[doc(alias = "G_UNICODE_SCRIPT_LATIN")]
1367 Latin,
1368 #[doc(alias = "G_UNICODE_SCRIPT_MALAYALAM")]
1369 Malayalam,
1370 #[doc(alias = "G_UNICODE_SCRIPT_MONGOLIAN")]
1371 Mongolian,
1372 #[doc(alias = "G_UNICODE_SCRIPT_MYANMAR")]
1373 Myanmar,
1374 #[doc(alias = "G_UNICODE_SCRIPT_OGHAM")]
1375 Ogham,
1376 #[doc(alias = "G_UNICODE_SCRIPT_OLD_ITALIC")]
1377 OldItalic,
1378 #[doc(alias = "G_UNICODE_SCRIPT_ORIYA")]
1379 Oriya,
1380 #[doc(alias = "G_UNICODE_SCRIPT_RUNIC")]
1381 Runic,
1382 #[doc(alias = "G_UNICODE_SCRIPT_SINHALA")]
1383 Sinhala,
1384 #[doc(alias = "G_UNICODE_SCRIPT_SYRIAC")]
1385 Syriac,
1386 #[doc(alias = "G_UNICODE_SCRIPT_TAMIL")]
1387 Tamil,
1388 #[doc(alias = "G_UNICODE_SCRIPT_TELUGU")]
1389 Telugu,
1390 #[doc(alias = "G_UNICODE_SCRIPT_THAANA")]
1391 Thaana,
1392 #[doc(alias = "G_UNICODE_SCRIPT_THAI")]
1393 Thai,
1394 #[doc(alias = "G_UNICODE_SCRIPT_TIBETAN")]
1395 Tibetan,
1396 #[doc(alias = "G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL")]
1397 CanadianAboriginal,
1398 #[doc(alias = "G_UNICODE_SCRIPT_YI")]
1399 Yi,
1400 #[doc(alias = "G_UNICODE_SCRIPT_TAGALOG")]
1401 Tagalog,
1402 #[doc(alias = "G_UNICODE_SCRIPT_HANUNOO")]
1403 Hanunoo,
1404 #[doc(alias = "G_UNICODE_SCRIPT_BUHID")]
1405 Buhid,
1406 #[doc(alias = "G_UNICODE_SCRIPT_TAGBANWA")]
1407 Tagbanwa,
1408 #[doc(alias = "G_UNICODE_SCRIPT_BRAILLE")]
1409 Braille,
1410 #[doc(alias = "G_UNICODE_SCRIPT_CYPRIOT")]
1411 Cypriot,
1412 #[doc(alias = "G_UNICODE_SCRIPT_LIMBU")]
1413 Limbu,
1414 #[doc(alias = "G_UNICODE_SCRIPT_OSMANYA")]
1415 Osmanya,
1416 #[doc(alias = "G_UNICODE_SCRIPT_SHAVIAN")]
1417 Shavian,
1418 #[doc(alias = "G_UNICODE_SCRIPT_LINEAR_B")]
1419 LinearB,
1420 #[doc(alias = "G_UNICODE_SCRIPT_TAI_LE")]
1421 TaiLe,
1422 #[doc(alias = "G_UNICODE_SCRIPT_UGARITIC")]
1423 Ugaritic,
1424 #[doc(alias = "G_UNICODE_SCRIPT_NEW_TAI_LUE")]
1425 NewTaiLue,
1426 #[doc(alias = "G_UNICODE_SCRIPT_BUGINESE")]
1427 Buginese,
1428 #[doc(alias = "G_UNICODE_SCRIPT_GLAGOLITIC")]
1429 Glagolitic,
1430 #[doc(alias = "G_UNICODE_SCRIPT_TIFINAGH")]
1431 Tifinagh,
1432 #[doc(alias = "G_UNICODE_SCRIPT_SYLOTI_NAGRI")]
1433 SylotiNagri,
1434 #[doc(alias = "G_UNICODE_SCRIPT_OLD_PERSIAN")]
1435 OldPersian,
1436 #[doc(alias = "G_UNICODE_SCRIPT_KHAROSHTHI")]
1437 Kharoshthi,
1438 #[doc(alias = "G_UNICODE_SCRIPT_UNKNOWN")]
1439 Unknown,
1440 #[doc(alias = "G_UNICODE_SCRIPT_BALINESE")]
1441 Balinese,
1442 #[doc(alias = "G_UNICODE_SCRIPT_CUNEIFORM")]
1443 Cuneiform,
1444 #[doc(alias = "G_UNICODE_SCRIPT_PHOENICIAN")]
1445 Phoenician,
1446 #[doc(alias = "G_UNICODE_SCRIPT_PHAGS_PA")]
1447 PhagsPa,
1448 #[doc(alias = "G_UNICODE_SCRIPT_NKO")]
1449 Nko,
1450 #[doc(alias = "G_UNICODE_SCRIPT_KAYAH_LI")]
1451 KayahLi,
1452 #[doc(alias = "G_UNICODE_SCRIPT_LEPCHA")]
1453 Lepcha,
1454 #[doc(alias = "G_UNICODE_SCRIPT_REJANG")]
1455 Rejang,
1456 #[doc(alias = "G_UNICODE_SCRIPT_SUNDANESE")]
1457 Sundanese,
1458 #[doc(alias = "G_UNICODE_SCRIPT_SAURASHTRA")]
1459 Saurashtra,
1460 #[doc(alias = "G_UNICODE_SCRIPT_CHAM")]
1461 Cham,
1462 #[doc(alias = "G_UNICODE_SCRIPT_OL_CHIKI")]
1463 OlChiki,
1464 #[doc(alias = "G_UNICODE_SCRIPT_VAI")]
1465 Vai,
1466 #[doc(alias = "G_UNICODE_SCRIPT_CARIAN")]
1467 Carian,
1468 #[doc(alias = "G_UNICODE_SCRIPT_LYCIAN")]
1469 Lycian,
1470 #[doc(alias = "G_UNICODE_SCRIPT_LYDIAN")]
1471 Lydian,
1472 #[doc(alias = "G_UNICODE_SCRIPT_AVESTAN")]
1473 Avestan,
1474 #[doc(alias = "G_UNICODE_SCRIPT_BAMUM")]
1475 Bamum,
1476 #[doc(alias = "G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS")]
1477 EgyptianHieroglyphs,
1478 #[doc(alias = "G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC")]
1479 ImperialAramaic,
1480 #[doc(alias = "G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI")]
1481 InscriptionalPahlavi,
1482 #[doc(alias = "G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN")]
1483 InscriptionalParthian,
1484 #[doc(alias = "G_UNICODE_SCRIPT_JAVANESE")]
1485 Javanese,
1486 #[doc(alias = "G_UNICODE_SCRIPT_KAITHI")]
1487 Kaithi,
1488 #[doc(alias = "G_UNICODE_SCRIPT_LISU")]
1489 Lisu,
1490 #[doc(alias = "G_UNICODE_SCRIPT_MEETEI_MAYEK")]
1491 MeeteiMayek,
1492 #[doc(alias = "G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN")]
1493 OldSouthArabian,
1494 #[doc(alias = "G_UNICODE_SCRIPT_OLD_TURKIC")]
1495 OldTurkic,
1496 #[doc(alias = "G_UNICODE_SCRIPT_SAMARITAN")]
1497 Samaritan,
1498 #[doc(alias = "G_UNICODE_SCRIPT_TAI_THAM")]
1499 TaiTham,
1500 #[doc(alias = "G_UNICODE_SCRIPT_TAI_VIET")]
1501 TaiViet,
1502 #[doc(alias = "G_UNICODE_SCRIPT_BATAK")]
1503 Batak,
1504 #[doc(alias = "G_UNICODE_SCRIPT_BRAHMI")]
1505 Brahmi,
1506 #[doc(alias = "G_UNICODE_SCRIPT_MANDAIC")]
1507 Mandaic,
1508 #[doc(alias = "G_UNICODE_SCRIPT_CHAKMA")]
1509 Chakma,
1510 #[doc(alias = "G_UNICODE_SCRIPT_MEROITIC_CURSIVE")]
1511 MeroiticCursive,
1512 #[doc(alias = "G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS")]
1513 MeroiticHieroglyphs,
1514 #[doc(alias = "G_UNICODE_SCRIPT_MIAO")]
1515 Miao,
1516 #[doc(alias = "G_UNICODE_SCRIPT_SHARADA")]
1517 Sharada,
1518 #[doc(alias = "G_UNICODE_SCRIPT_SORA_SOMPENG")]
1519 SoraSompeng,
1520 #[doc(alias = "G_UNICODE_SCRIPT_TAKRI")]
1521 Takri,
1522 #[doc(alias = "G_UNICODE_SCRIPT_BASSA_VAH")]
1523 BassaVah,
1524 #[doc(alias = "G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN")]
1525 CaucasianAlbanian,
1526 #[doc(alias = "G_UNICODE_SCRIPT_DUPLOYAN")]
1527 Duployan,
1528 #[doc(alias = "G_UNICODE_SCRIPT_ELBASAN")]
1529 Elbasan,
1530 #[doc(alias = "G_UNICODE_SCRIPT_GRANTHA")]
1531 Grantha,
1532 #[doc(alias = "G_UNICODE_SCRIPT_KHOJKI")]
1533 Khojki,
1534 #[doc(alias = "G_UNICODE_SCRIPT_KHUDAWADI")]
1535 Khudawadi,
1536 #[doc(alias = "G_UNICODE_SCRIPT_LINEAR_A")]
1537 LinearA,
1538 #[doc(alias = "G_UNICODE_SCRIPT_MAHAJANI")]
1539 Mahajani,
1540 #[doc(alias = "G_UNICODE_SCRIPT_MANICHAEAN")]
1541 Manichaean,
1542 #[doc(alias = "G_UNICODE_SCRIPT_MENDE_KIKAKUI")]
1543 MendeKikakui,
1544 #[doc(alias = "G_UNICODE_SCRIPT_MODI")]
1545 Modi,
1546 #[doc(alias = "G_UNICODE_SCRIPT_MRO")]
1547 Mro,
1548 #[doc(alias = "G_UNICODE_SCRIPT_NABATAEAN")]
1549 Nabataean,
1550 #[doc(alias = "G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN")]
1551 OldNorthArabian,
1552 #[doc(alias = "G_UNICODE_SCRIPT_OLD_PERMIC")]
1553 OldPermic,
1554 #[doc(alias = "G_UNICODE_SCRIPT_PAHAWH_HMONG")]
1555 PahawhHmong,
1556 #[doc(alias = "G_UNICODE_SCRIPT_PALMYRENE")]
1557 Palmyrene,
1558 #[doc(alias = "G_UNICODE_SCRIPT_PAU_CIN_HAU")]
1559 PauCinHau,
1560 #[doc(alias = "G_UNICODE_SCRIPT_PSALTER_PAHLAVI")]
1561 PsalterPahlavi,
1562 #[doc(alias = "G_UNICODE_SCRIPT_SIDDHAM")]
1563 Siddham,
1564 #[doc(alias = "G_UNICODE_SCRIPT_TIRHUTA")]
1565 Tirhuta,
1566 #[doc(alias = "G_UNICODE_SCRIPT_WARANG_CITI")]
1567 WarangCiti,
1568 #[doc(alias = "G_UNICODE_SCRIPT_AHOM")]
1569 Ahom,
1570 #[doc(alias = "G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS")]
1571 AnatolianHieroglyphs,
1572 #[doc(alias = "G_UNICODE_SCRIPT_HATRAN")]
1573 Hatran,
1574 #[doc(alias = "G_UNICODE_SCRIPT_MULTANI")]
1575 Multani,
1576 #[doc(alias = "G_UNICODE_SCRIPT_OLD_HUNGARIAN")]
1577 OldHungarian,
1578 #[doc(alias = "G_UNICODE_SCRIPT_SIGNWRITING")]
1579 Signwriting,
1580 #[doc(alias = "G_UNICODE_SCRIPT_ADLAM")]
1581 Adlam,
1582 #[doc(alias = "G_UNICODE_SCRIPT_BHAIKSUKI")]
1583 Bhaiksuki,
1584 #[doc(alias = "G_UNICODE_SCRIPT_MARCHEN")]
1585 Marchen,
1586 #[doc(alias = "G_UNICODE_SCRIPT_NEWA")]
1587 Newa,
1588 #[doc(alias = "G_UNICODE_SCRIPT_OSAGE")]
1589 Osage,
1590 #[doc(alias = "G_UNICODE_SCRIPT_TANGUT")]
1591 Tangut,
1592 #[doc(alias = "G_UNICODE_SCRIPT_MASARAM_GONDI")]
1593 MasaramGondi,
1594 #[doc(alias = "G_UNICODE_SCRIPT_NUSHU")]
1595 Nushu,
1596 #[doc(alias = "G_UNICODE_SCRIPT_SOYOMBO")]
1597 Soyombo,
1598 #[doc(alias = "G_UNICODE_SCRIPT_ZANABAZAR_SQUARE")]
1599 ZanabazarSquare,
1600 #[doc(alias = "G_UNICODE_SCRIPT_DOGRA")]
1601 Dogra,
1602 #[doc(alias = "G_UNICODE_SCRIPT_GUNJALA_GONDI")]
1603 GunjalaGondi,
1604 #[doc(alias = "G_UNICODE_SCRIPT_HANIFI_ROHINGYA")]
1605 HanifiRohingya,
1606 #[doc(alias = "G_UNICODE_SCRIPT_MAKASAR")]
1607 Makasar,
1608 #[doc(alias = "G_UNICODE_SCRIPT_MEDEFAIDRIN")]
1609 Medefaidrin,
1610 #[doc(alias = "G_UNICODE_SCRIPT_OLD_SOGDIAN")]
1611 OldSogdian,
1612 #[doc(alias = "G_UNICODE_SCRIPT_SOGDIAN")]
1613 Sogdian,
1614 #[doc(alias = "G_UNICODE_SCRIPT_ELYMAIC")]
1615 Elymaic,
1616 #[doc(alias = "G_UNICODE_SCRIPT_NANDINAGARI")]
1617 Nandinagari,
1618 #[doc(alias = "G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG")]
1619 NyiakengPuachueHmong,
1620 #[doc(alias = "G_UNICODE_SCRIPT_WANCHO")]
1621 Wancho,
1622 #[doc(alias = "G_UNICODE_SCRIPT_CHORASMIAN")]
1623 Chorasmian,
1624 #[doc(alias = "G_UNICODE_SCRIPT_DIVES_AKURU")]
1625 DivesAkuru,
1626 #[doc(alias = "G_UNICODE_SCRIPT_KHITAN_SMALL_SCRIPT")]
1627 KhitanSmallScript,
1628 #[doc(alias = "G_UNICODE_SCRIPT_YEZIDI")]
1629 Yezidi,
1630 #[cfg(feature = "v2_72")]
1631 #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))]
1632 #[doc(alias = "G_UNICODE_SCRIPT_CYPRO_MINOAN")]
1633 CyproMinoan,
1634 #[cfg(feature = "v2_72")]
1635 #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))]
1636 #[doc(alias = "G_UNICODE_SCRIPT_OLD_UYGHUR")]
1637 OldUyghur,
1638 #[cfg(feature = "v2_72")]
1639 #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))]
1640 #[doc(alias = "G_UNICODE_SCRIPT_TANGSA")]
1641 Tangsa,
1642 #[cfg(feature = "v2_72")]
1643 #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))]
1644 #[doc(alias = "G_UNICODE_SCRIPT_TOTO")]
1645 Toto,
1646 #[cfg(feature = "v2_72")]
1647 #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))]
1648 #[doc(alias = "G_UNICODE_SCRIPT_VITHKUQI")]
1649 Vithkuqi,
1650 #[cfg(feature = "v2_72")]
1651 #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))]
1652 #[doc(alias = "G_UNICODE_SCRIPT_MATH")]
1653 Math,
1654 #[cfg(feature = "v2_74")]
1655 #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))]
1656 #[doc(alias = "G_UNICODE_SCRIPT_KAWI")]
1657 Kawi,
1658 #[cfg(feature = "v2_74")]
1659 #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))]
1660 #[doc(alias = "G_UNICODE_SCRIPT_NAG_MUNDARI")]
1661 NagMundari,
1662 #[doc(hidden)]
1663 __Unknown(i32),
1664}
1665
1666impl fmt::Display for UnicodeScript {
1667 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1668 write!(
1669 f,
1670 "UnicodeScript::{}",
1671 match *self {
1672 Self::InvalidCode => "InvalidCode",
1673 Self::Common => "Common",
1674 Self::Inherited => "Inherited",
1675 Self::Arabic => "Arabic",
1676 Self::Armenian => "Armenian",
1677 Self::Bengali => "Bengali",
1678 Self::Bopomofo => "Bopomofo",
1679 Self::Cherokee => "Cherokee",
1680 Self::Coptic => "Coptic",
1681 Self::Cyrillic => "Cyrillic",
1682 Self::Deseret => "Deseret",
1683 Self::Devanagari => "Devanagari",
1684 Self::Ethiopic => "Ethiopic",
1685 Self::Georgian => "Georgian",
1686 Self::Gothic => "Gothic",
1687 Self::Greek => "Greek",
1688 Self::Gujarati => "Gujarati",
1689 Self::Gurmukhi => "Gurmukhi",
1690 Self::Han => "Han",
1691 Self::Hangul => "Hangul",
1692 Self::Hebrew => "Hebrew",
1693 Self::Hiragana => "Hiragana",
1694 Self::Kannada => "Kannada",
1695 Self::Katakana => "Katakana",
1696 Self::Khmer => "Khmer",
1697 Self::Lao => "Lao",
1698 Self::Latin => "Latin",
1699 Self::Malayalam => "Malayalam",
1700 Self::Mongolian => "Mongolian",
1701 Self::Myanmar => "Myanmar",
1702 Self::Ogham => "Ogham",
1703 Self::OldItalic => "OldItalic",
1704 Self::Oriya => "Oriya",
1705 Self::Runic => "Runic",
1706 Self::Sinhala => "Sinhala",
1707 Self::Syriac => "Syriac",
1708 Self::Tamil => "Tamil",
1709 Self::Telugu => "Telugu",
1710 Self::Thaana => "Thaana",
1711 Self::Thai => "Thai",
1712 Self::Tibetan => "Tibetan",
1713 Self::CanadianAboriginal => "CanadianAboriginal",
1714 Self::Yi => "Yi",
1715 Self::Tagalog => "Tagalog",
1716 Self::Hanunoo => "Hanunoo",
1717 Self::Buhid => "Buhid",
1718 Self::Tagbanwa => "Tagbanwa",
1719 Self::Braille => "Braille",
1720 Self::Cypriot => "Cypriot",
1721 Self::Limbu => "Limbu",
1722 Self::Osmanya => "Osmanya",
1723 Self::Shavian => "Shavian",
1724 Self::LinearB => "LinearB",
1725 Self::TaiLe => "TaiLe",
1726 Self::Ugaritic => "Ugaritic",
1727 Self::NewTaiLue => "NewTaiLue",
1728 Self::Buginese => "Buginese",
1729 Self::Glagolitic => "Glagolitic",
1730 Self::Tifinagh => "Tifinagh",
1731 Self::SylotiNagri => "SylotiNagri",
1732 Self::OldPersian => "OldPersian",
1733 Self::Kharoshthi => "Kharoshthi",
1734 Self::Unknown => "Unknown",
1735 Self::Balinese => "Balinese",
1736 Self::Cuneiform => "Cuneiform",
1737 Self::Phoenician => "Phoenician",
1738 Self::PhagsPa => "PhagsPa",
1739 Self::Nko => "Nko",
1740 Self::KayahLi => "KayahLi",
1741 Self::Lepcha => "Lepcha",
1742 Self::Rejang => "Rejang",
1743 Self::Sundanese => "Sundanese",
1744 Self::Saurashtra => "Saurashtra",
1745 Self::Cham => "Cham",
1746 Self::OlChiki => "OlChiki",
1747 Self::Vai => "Vai",
1748 Self::Carian => "Carian",
1749 Self::Lycian => "Lycian",
1750 Self::Lydian => "Lydian",
1751 Self::Avestan => "Avestan",
1752 Self::Bamum => "Bamum",
1753 Self::EgyptianHieroglyphs => "EgyptianHieroglyphs",
1754 Self::ImperialAramaic => "ImperialAramaic",
1755 Self::InscriptionalPahlavi => "InscriptionalPahlavi",
1756 Self::InscriptionalParthian => "InscriptionalParthian",
1757 Self::Javanese => "Javanese",
1758 Self::Kaithi => "Kaithi",
1759 Self::Lisu => "Lisu",
1760 Self::MeeteiMayek => "MeeteiMayek",
1761 Self::OldSouthArabian => "OldSouthArabian",
1762 Self::OldTurkic => "OldTurkic",
1763 Self::Samaritan => "Samaritan",
1764 Self::TaiTham => "TaiTham",
1765 Self::TaiViet => "TaiViet",
1766 Self::Batak => "Batak",
1767 Self::Brahmi => "Brahmi",
1768 Self::Mandaic => "Mandaic",
1769 Self::Chakma => "Chakma",
1770 Self::MeroiticCursive => "MeroiticCursive",
1771 Self::MeroiticHieroglyphs => "MeroiticHieroglyphs",
1772 Self::Miao => "Miao",
1773 Self::Sharada => "Sharada",
1774 Self::SoraSompeng => "SoraSompeng",
1775 Self::Takri => "Takri",
1776 Self::BassaVah => "BassaVah",
1777 Self::CaucasianAlbanian => "CaucasianAlbanian",
1778 Self::Duployan => "Duployan",
1779 Self::Elbasan => "Elbasan",
1780 Self::Grantha => "Grantha",
1781 Self::Khojki => "Khojki",
1782 Self::Khudawadi => "Khudawadi",
1783 Self::LinearA => "LinearA",
1784 Self::Mahajani => "Mahajani",
1785 Self::Manichaean => "Manichaean",
1786 Self::MendeKikakui => "MendeKikakui",
1787 Self::Modi => "Modi",
1788 Self::Mro => "Mro",
1789 Self::Nabataean => "Nabataean",
1790 Self::OldNorthArabian => "OldNorthArabian",
1791 Self::OldPermic => "OldPermic",
1792 Self::PahawhHmong => "PahawhHmong",
1793 Self::Palmyrene => "Palmyrene",
1794 Self::PauCinHau => "PauCinHau",
1795 Self::PsalterPahlavi => "PsalterPahlavi",
1796 Self::Siddham => "Siddham",
1797 Self::Tirhuta => "Tirhuta",
1798 Self::WarangCiti => "WarangCiti",
1799 Self::Ahom => "Ahom",
1800 Self::AnatolianHieroglyphs => "AnatolianHieroglyphs",
1801 Self::Hatran => "Hatran",
1802 Self::Multani => "Multani",
1803 Self::OldHungarian => "OldHungarian",
1804 Self::Signwriting => "Signwriting",
1805 Self::Adlam => "Adlam",
1806 Self::Bhaiksuki => "Bhaiksuki",
1807 Self::Marchen => "Marchen",
1808 Self::Newa => "Newa",
1809 Self::Osage => "Osage",
1810 Self::Tangut => "Tangut",
1811 Self::MasaramGondi => "MasaramGondi",
1812 Self::Nushu => "Nushu",
1813 Self::Soyombo => "Soyombo",
1814 Self::ZanabazarSquare => "ZanabazarSquare",
1815 Self::Dogra => "Dogra",
1816 Self::GunjalaGondi => "GunjalaGondi",
1817 Self::HanifiRohingya => "HanifiRohingya",
1818 Self::Makasar => "Makasar",
1819 Self::Medefaidrin => "Medefaidrin",
1820 Self::OldSogdian => "OldSogdian",
1821 Self::Sogdian => "Sogdian",
1822 Self::Elymaic => "Elymaic",
1823 Self::Nandinagari => "Nandinagari",
1824 Self::NyiakengPuachueHmong => "NyiakengPuachueHmong",
1825 Self::Wancho => "Wancho",
1826 Self::Chorasmian => "Chorasmian",
1827 Self::DivesAkuru => "DivesAkuru",
1828 Self::KhitanSmallScript => "KhitanSmallScript",
1829 Self::Yezidi => "Yezidi",
1830 #[cfg(feature = "v2_72")]
1831 Self::CyproMinoan => "CyproMinoan",
1832 #[cfg(feature = "v2_72")]
1833 Self::OldUyghur => "OldUyghur",
1834 #[cfg(feature = "v2_72")]
1835 Self::Tangsa => "Tangsa",
1836 #[cfg(feature = "v2_72")]
1837 Self::Toto => "Toto",
1838 #[cfg(feature = "v2_72")]
1839 Self::Vithkuqi => "Vithkuqi",
1840 #[cfg(feature = "v2_72")]
1841 Self::Math => "Math",
1842 #[cfg(feature = "v2_74")]
1843 Self::Kawi => "Kawi",
1844 #[cfg(feature = "v2_74")]
1845 Self::NagMundari => "NagMundari",
1846 _ => "Unknown",
1847 }
1848 )
1849 }
1850}
1851
1852#[doc(hidden)]
1853impl IntoGlib for UnicodeScript {
1854 type GlibType = ffi::GUnicodeScript;
1855
1856 fn into_glib(self) -> ffi::GUnicodeScript {
1857 match self {
1858 Self::InvalidCode => ffi::G_UNICODE_SCRIPT_INVALID_CODE,
1859 Self::Common => ffi::G_UNICODE_SCRIPT_COMMON,
1860 Self::Inherited => ffi::G_UNICODE_SCRIPT_INHERITED,
1861 Self::Arabic => ffi::G_UNICODE_SCRIPT_ARABIC,
1862 Self::Armenian => ffi::G_UNICODE_SCRIPT_ARMENIAN,
1863 Self::Bengali => ffi::G_UNICODE_SCRIPT_BENGALI,
1864 Self::Bopomofo => ffi::G_UNICODE_SCRIPT_BOPOMOFO,
1865 Self::Cherokee => ffi::G_UNICODE_SCRIPT_CHEROKEE,
1866 Self::Coptic => ffi::G_UNICODE_SCRIPT_COPTIC,
1867 Self::Cyrillic => ffi::G_UNICODE_SCRIPT_CYRILLIC,
1868 Self::Deseret => ffi::G_UNICODE_SCRIPT_DESERET,
1869 Self::Devanagari => ffi::G_UNICODE_SCRIPT_DEVANAGARI,
1870 Self::Ethiopic => ffi::G_UNICODE_SCRIPT_ETHIOPIC,
1871 Self::Georgian => ffi::G_UNICODE_SCRIPT_GEORGIAN,
1872 Self::Gothic => ffi::G_UNICODE_SCRIPT_GOTHIC,
1873 Self::Greek => ffi::G_UNICODE_SCRIPT_GREEK,
1874 Self::Gujarati => ffi::G_UNICODE_SCRIPT_GUJARATI,
1875 Self::Gurmukhi => ffi::G_UNICODE_SCRIPT_GURMUKHI,
1876 Self::Han => ffi::G_UNICODE_SCRIPT_HAN,
1877 Self::Hangul => ffi::G_UNICODE_SCRIPT_HANGUL,
1878 Self::Hebrew => ffi::G_UNICODE_SCRIPT_HEBREW,
1879 Self::Hiragana => ffi::G_UNICODE_SCRIPT_HIRAGANA,
1880 Self::Kannada => ffi::G_UNICODE_SCRIPT_KANNADA,
1881 Self::Katakana => ffi::G_UNICODE_SCRIPT_KATAKANA,
1882 Self::Khmer => ffi::G_UNICODE_SCRIPT_KHMER,
1883 Self::Lao => ffi::G_UNICODE_SCRIPT_LAO,
1884 Self::Latin => ffi::G_UNICODE_SCRIPT_LATIN,
1885 Self::Malayalam => ffi::G_UNICODE_SCRIPT_MALAYALAM,
1886 Self::Mongolian => ffi::G_UNICODE_SCRIPT_MONGOLIAN,
1887 Self::Myanmar => ffi::G_UNICODE_SCRIPT_MYANMAR,
1888 Self::Ogham => ffi::G_UNICODE_SCRIPT_OGHAM,
1889 Self::OldItalic => ffi::G_UNICODE_SCRIPT_OLD_ITALIC,
1890 Self::Oriya => ffi::G_UNICODE_SCRIPT_ORIYA,
1891 Self::Runic => ffi::G_UNICODE_SCRIPT_RUNIC,
1892 Self::Sinhala => ffi::G_UNICODE_SCRIPT_SINHALA,
1893 Self::Syriac => ffi::G_UNICODE_SCRIPT_SYRIAC,
1894 Self::Tamil => ffi::G_UNICODE_SCRIPT_TAMIL,
1895 Self::Telugu => ffi::G_UNICODE_SCRIPT_TELUGU,
1896 Self::Thaana => ffi::G_UNICODE_SCRIPT_THAANA,
1897 Self::Thai => ffi::G_UNICODE_SCRIPT_THAI,
1898 Self::Tibetan => ffi::G_UNICODE_SCRIPT_TIBETAN,
1899 Self::CanadianAboriginal => ffi::G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL,
1900 Self::Yi => ffi::G_UNICODE_SCRIPT_YI,
1901 Self::Tagalog => ffi::G_UNICODE_SCRIPT_TAGALOG,
1902 Self::Hanunoo => ffi::G_UNICODE_SCRIPT_HANUNOO,
1903 Self::Buhid => ffi::G_UNICODE_SCRIPT_BUHID,
1904 Self::Tagbanwa => ffi::G_UNICODE_SCRIPT_TAGBANWA,
1905 Self::Braille => ffi::G_UNICODE_SCRIPT_BRAILLE,
1906 Self::Cypriot => ffi::G_UNICODE_SCRIPT_CYPRIOT,
1907 Self::Limbu => ffi::G_UNICODE_SCRIPT_LIMBU,
1908 Self::Osmanya => ffi::G_UNICODE_SCRIPT_OSMANYA,
1909 Self::Shavian => ffi::G_UNICODE_SCRIPT_SHAVIAN,
1910 Self::LinearB => ffi::G_UNICODE_SCRIPT_LINEAR_B,
1911 Self::TaiLe => ffi::G_UNICODE_SCRIPT_TAI_LE,
1912 Self::Ugaritic => ffi::G_UNICODE_SCRIPT_UGARITIC,
1913 Self::NewTaiLue => ffi::G_UNICODE_SCRIPT_NEW_TAI_LUE,
1914 Self::Buginese => ffi::G_UNICODE_SCRIPT_BUGINESE,
1915 Self::Glagolitic => ffi::G_UNICODE_SCRIPT_GLAGOLITIC,
1916 Self::Tifinagh => ffi::G_UNICODE_SCRIPT_TIFINAGH,
1917 Self::SylotiNagri => ffi::G_UNICODE_SCRIPT_SYLOTI_NAGRI,
1918 Self::OldPersian => ffi::G_UNICODE_SCRIPT_OLD_PERSIAN,
1919 Self::Kharoshthi => ffi::G_UNICODE_SCRIPT_KHAROSHTHI,
1920 Self::Unknown => ffi::G_UNICODE_SCRIPT_UNKNOWN,
1921 Self::Balinese => ffi::G_UNICODE_SCRIPT_BALINESE,
1922 Self::Cuneiform => ffi::G_UNICODE_SCRIPT_CUNEIFORM,
1923 Self::Phoenician => ffi::G_UNICODE_SCRIPT_PHOENICIAN,
1924 Self::PhagsPa => ffi::G_UNICODE_SCRIPT_PHAGS_PA,
1925 Self::Nko => ffi::G_UNICODE_SCRIPT_NKO,
1926 Self::KayahLi => ffi::G_UNICODE_SCRIPT_KAYAH_LI,
1927 Self::Lepcha => ffi::G_UNICODE_SCRIPT_LEPCHA,
1928 Self::Rejang => ffi::G_UNICODE_SCRIPT_REJANG,
1929 Self::Sundanese => ffi::G_UNICODE_SCRIPT_SUNDANESE,
1930 Self::Saurashtra => ffi::G_UNICODE_SCRIPT_SAURASHTRA,
1931 Self::Cham => ffi::G_UNICODE_SCRIPT_CHAM,
1932 Self::OlChiki => ffi::G_UNICODE_SCRIPT_OL_CHIKI,
1933 Self::Vai => ffi::G_UNICODE_SCRIPT_VAI,
1934 Self::Carian => ffi::G_UNICODE_SCRIPT_CARIAN,
1935 Self::Lycian => ffi::G_UNICODE_SCRIPT_LYCIAN,
1936 Self::Lydian => ffi::G_UNICODE_SCRIPT_LYDIAN,
1937 Self::Avestan => ffi::G_UNICODE_SCRIPT_AVESTAN,
1938 Self::Bamum => ffi::G_UNICODE_SCRIPT_BAMUM,
1939 Self::EgyptianHieroglyphs => ffi::G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS,
1940 Self::ImperialAramaic => ffi::G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC,
1941 Self::InscriptionalPahlavi => ffi::G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI,
1942 Self::InscriptionalParthian => ffi::G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN,
1943 Self::Javanese => ffi::G_UNICODE_SCRIPT_JAVANESE,
1944 Self::Kaithi => ffi::G_UNICODE_SCRIPT_KAITHI,
1945 Self::Lisu => ffi::G_UNICODE_SCRIPT_LISU,
1946 Self::MeeteiMayek => ffi::G_UNICODE_SCRIPT_MEETEI_MAYEK,
1947 Self::OldSouthArabian => ffi::G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN,
1948 Self::OldTurkic => ffi::G_UNICODE_SCRIPT_OLD_TURKIC,
1949 Self::Samaritan => ffi::G_UNICODE_SCRIPT_SAMARITAN,
1950 Self::TaiTham => ffi::G_UNICODE_SCRIPT_TAI_THAM,
1951 Self::TaiViet => ffi::G_UNICODE_SCRIPT_TAI_VIET,
1952 Self::Batak => ffi::G_UNICODE_SCRIPT_BATAK,
1953 Self::Brahmi => ffi::G_UNICODE_SCRIPT_BRAHMI,
1954 Self::Mandaic => ffi::G_UNICODE_SCRIPT_MANDAIC,
1955 Self::Chakma => ffi::G_UNICODE_SCRIPT_CHAKMA,
1956 Self::MeroiticCursive => ffi::G_UNICODE_SCRIPT_MEROITIC_CURSIVE,
1957 Self::MeroiticHieroglyphs => ffi::G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS,
1958 Self::Miao => ffi::G_UNICODE_SCRIPT_MIAO,
1959 Self::Sharada => ffi::G_UNICODE_SCRIPT_SHARADA,
1960 Self::SoraSompeng => ffi::G_UNICODE_SCRIPT_SORA_SOMPENG,
1961 Self::Takri => ffi::G_UNICODE_SCRIPT_TAKRI,
1962 Self::BassaVah => ffi::G_UNICODE_SCRIPT_BASSA_VAH,
1963 Self::CaucasianAlbanian => ffi::G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN,
1964 Self::Duployan => ffi::G_UNICODE_SCRIPT_DUPLOYAN,
1965 Self::Elbasan => ffi::G_UNICODE_SCRIPT_ELBASAN,
1966 Self::Grantha => ffi::G_UNICODE_SCRIPT_GRANTHA,
1967 Self::Khojki => ffi::G_UNICODE_SCRIPT_KHOJKI,
1968 Self::Khudawadi => ffi::G_UNICODE_SCRIPT_KHUDAWADI,
1969 Self::LinearA => ffi::G_UNICODE_SCRIPT_LINEAR_A,
1970 Self::Mahajani => ffi::G_UNICODE_SCRIPT_MAHAJANI,
1971 Self::Manichaean => ffi::G_UNICODE_SCRIPT_MANICHAEAN,
1972 Self::MendeKikakui => ffi::G_UNICODE_SCRIPT_MENDE_KIKAKUI,
1973 Self::Modi => ffi::G_UNICODE_SCRIPT_MODI,
1974 Self::Mro => ffi::G_UNICODE_SCRIPT_MRO,
1975 Self::Nabataean => ffi::G_UNICODE_SCRIPT_NABATAEAN,
1976 Self::OldNorthArabian => ffi::G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN,
1977 Self::OldPermic => ffi::G_UNICODE_SCRIPT_OLD_PERMIC,
1978 Self::PahawhHmong => ffi::G_UNICODE_SCRIPT_PAHAWH_HMONG,
1979 Self::Palmyrene => ffi::G_UNICODE_SCRIPT_PALMYRENE,
1980 Self::PauCinHau => ffi::G_UNICODE_SCRIPT_PAU_CIN_HAU,
1981 Self::PsalterPahlavi => ffi::G_UNICODE_SCRIPT_PSALTER_PAHLAVI,
1982 Self::Siddham => ffi::G_UNICODE_SCRIPT_SIDDHAM,
1983 Self::Tirhuta => ffi::G_UNICODE_SCRIPT_TIRHUTA,
1984 Self::WarangCiti => ffi::G_UNICODE_SCRIPT_WARANG_CITI,
1985 Self::Ahom => ffi::G_UNICODE_SCRIPT_AHOM,
1986 Self::AnatolianHieroglyphs => ffi::G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS,
1987 Self::Hatran => ffi::G_UNICODE_SCRIPT_HATRAN,
1988 Self::Multani => ffi::G_UNICODE_SCRIPT_MULTANI,
1989 Self::OldHungarian => ffi::G_UNICODE_SCRIPT_OLD_HUNGARIAN,
1990 Self::Signwriting => ffi::G_UNICODE_SCRIPT_SIGNWRITING,
1991 Self::Adlam => ffi::G_UNICODE_SCRIPT_ADLAM,
1992 Self::Bhaiksuki => ffi::G_UNICODE_SCRIPT_BHAIKSUKI,
1993 Self::Marchen => ffi::G_UNICODE_SCRIPT_MARCHEN,
1994 Self::Newa => ffi::G_UNICODE_SCRIPT_NEWA,
1995 Self::Osage => ffi::G_UNICODE_SCRIPT_OSAGE,
1996 Self::Tangut => ffi::G_UNICODE_SCRIPT_TANGUT,
1997 Self::MasaramGondi => ffi::G_UNICODE_SCRIPT_MASARAM_GONDI,
1998 Self::Nushu => ffi::G_UNICODE_SCRIPT_NUSHU,
1999 Self::Soyombo => ffi::G_UNICODE_SCRIPT_SOYOMBO,
2000 Self::ZanabazarSquare => ffi::G_UNICODE_SCRIPT_ZANABAZAR_SQUARE,
2001 Self::Dogra => ffi::G_UNICODE_SCRIPT_DOGRA,
2002 Self::GunjalaGondi => ffi::G_UNICODE_SCRIPT_GUNJALA_GONDI,
2003 Self::HanifiRohingya => ffi::G_UNICODE_SCRIPT_HANIFI_ROHINGYA,
2004 Self::Makasar => ffi::G_UNICODE_SCRIPT_MAKASAR,
2005 Self::Medefaidrin => ffi::G_UNICODE_SCRIPT_MEDEFAIDRIN,
2006 Self::OldSogdian => ffi::G_UNICODE_SCRIPT_OLD_SOGDIAN,
2007 Self::Sogdian => ffi::G_UNICODE_SCRIPT_SOGDIAN,
2008 Self::Elymaic => ffi::G_UNICODE_SCRIPT_ELYMAIC,
2009 Self::Nandinagari => ffi::G_UNICODE_SCRIPT_NANDINAGARI,
2010 Self::NyiakengPuachueHmong => ffi::G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG,
2011 Self::Wancho => ffi::G_UNICODE_SCRIPT_WANCHO,
2012 Self::Chorasmian => ffi::G_UNICODE_SCRIPT_CHORASMIAN,
2013 Self::DivesAkuru => ffi::G_UNICODE_SCRIPT_DIVES_AKURU,
2014 Self::KhitanSmallScript => ffi::G_UNICODE_SCRIPT_KHITAN_SMALL_SCRIPT,
2015 Self::Yezidi => ffi::G_UNICODE_SCRIPT_YEZIDI,
2016 #[cfg(feature = "v2_72")]
2017 Self::CyproMinoan => ffi::G_UNICODE_SCRIPT_CYPRO_MINOAN,
2018 #[cfg(feature = "v2_72")]
2019 Self::OldUyghur => ffi::G_UNICODE_SCRIPT_OLD_UYGHUR,
2020 #[cfg(feature = "v2_72")]
2021 Self::Tangsa => ffi::G_UNICODE_SCRIPT_TANGSA,
2022 #[cfg(feature = "v2_72")]
2023 Self::Toto => ffi::G_UNICODE_SCRIPT_TOTO,
2024 #[cfg(feature = "v2_72")]
2025 Self::Vithkuqi => ffi::G_UNICODE_SCRIPT_VITHKUQI,
2026 #[cfg(feature = "v2_72")]
2027 Self::Math => ffi::G_UNICODE_SCRIPT_MATH,
2028 #[cfg(feature = "v2_74")]
2029 Self::Kawi => ffi::G_UNICODE_SCRIPT_KAWI,
2030 #[cfg(feature = "v2_74")]
2031 Self::NagMundari => ffi::G_UNICODE_SCRIPT_NAG_MUNDARI,
2032 Self::__Unknown(value) => value,
2033 }
2034 }
2035}
2036
2037#[doc(hidden)]
2038impl FromGlib<ffi::GUnicodeScript> for UnicodeScript {
2039 unsafe fn from_glib(value: ffi::GUnicodeScript) -> Self {
2040 match value {
2041 ffi::G_UNICODE_SCRIPT_INVALID_CODE => Self::InvalidCode,
2042 ffi::G_UNICODE_SCRIPT_COMMON => Self::Common,
2043 ffi::G_UNICODE_SCRIPT_INHERITED => Self::Inherited,
2044 ffi::G_UNICODE_SCRIPT_ARABIC => Self::Arabic,
2045 ffi::G_UNICODE_SCRIPT_ARMENIAN => Self::Armenian,
2046 ffi::G_UNICODE_SCRIPT_BENGALI => Self::Bengali,
2047 ffi::G_UNICODE_SCRIPT_BOPOMOFO => Self::Bopomofo,
2048 ffi::G_UNICODE_SCRIPT_CHEROKEE => Self::Cherokee,
2049 ffi::G_UNICODE_SCRIPT_COPTIC => Self::Coptic,
2050 ffi::G_UNICODE_SCRIPT_CYRILLIC => Self::Cyrillic,
2051 ffi::G_UNICODE_SCRIPT_DESERET => Self::Deseret,
2052 ffi::G_UNICODE_SCRIPT_DEVANAGARI => Self::Devanagari,
2053 ffi::G_UNICODE_SCRIPT_ETHIOPIC => Self::Ethiopic,
2054 ffi::G_UNICODE_SCRIPT_GEORGIAN => Self::Georgian,
2055 ffi::G_UNICODE_SCRIPT_GOTHIC => Self::Gothic,
2056 ffi::G_UNICODE_SCRIPT_GREEK => Self::Greek,
2057 ffi::G_UNICODE_SCRIPT_GUJARATI => Self::Gujarati,
2058 ffi::G_UNICODE_SCRIPT_GURMUKHI => Self::Gurmukhi,
2059 ffi::G_UNICODE_SCRIPT_HAN => Self::Han,
2060 ffi::G_UNICODE_SCRIPT_HANGUL => Self::Hangul,
2061 ffi::G_UNICODE_SCRIPT_HEBREW => Self::Hebrew,
2062 ffi::G_UNICODE_SCRIPT_HIRAGANA => Self::Hiragana,
2063 ffi::G_UNICODE_SCRIPT_KANNADA => Self::Kannada,
2064 ffi::G_UNICODE_SCRIPT_KATAKANA => Self::Katakana,
2065 ffi::G_UNICODE_SCRIPT_KHMER => Self::Khmer,
2066 ffi::G_UNICODE_SCRIPT_LAO => Self::Lao,
2067 ffi::G_UNICODE_SCRIPT_LATIN => Self::Latin,
2068 ffi::G_UNICODE_SCRIPT_MALAYALAM => Self::Malayalam,
2069 ffi::G_UNICODE_SCRIPT_MONGOLIAN => Self::Mongolian,
2070 ffi::G_UNICODE_SCRIPT_MYANMAR => Self::Myanmar,
2071 ffi::G_UNICODE_SCRIPT_OGHAM => Self::Ogham,
2072 ffi::G_UNICODE_SCRIPT_OLD_ITALIC => Self::OldItalic,
2073 ffi::G_UNICODE_SCRIPT_ORIYA => Self::Oriya,
2074 ffi::G_UNICODE_SCRIPT_RUNIC => Self::Runic,
2075 ffi::G_UNICODE_SCRIPT_SINHALA => Self::Sinhala,
2076 ffi::G_UNICODE_SCRIPT_SYRIAC => Self::Syriac,
2077 ffi::G_UNICODE_SCRIPT_TAMIL => Self::Tamil,
2078 ffi::G_UNICODE_SCRIPT_TELUGU => Self::Telugu,
2079 ffi::G_UNICODE_SCRIPT_THAANA => Self::Thaana,
2080 ffi::G_UNICODE_SCRIPT_THAI => Self::Thai,
2081 ffi::G_UNICODE_SCRIPT_TIBETAN => Self::Tibetan,
2082 ffi::G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL => Self::CanadianAboriginal,
2083 ffi::G_UNICODE_SCRIPT_YI => Self::Yi,
2084 ffi::G_UNICODE_SCRIPT_TAGALOG => Self::Tagalog,
2085 ffi::G_UNICODE_SCRIPT_HANUNOO => Self::Hanunoo,
2086 ffi::G_UNICODE_SCRIPT_BUHID => Self::Buhid,
2087 ffi::G_UNICODE_SCRIPT_TAGBANWA => Self::Tagbanwa,
2088 ffi::G_UNICODE_SCRIPT_BRAILLE => Self::Braille,
2089 ffi::G_UNICODE_SCRIPT_CYPRIOT => Self::Cypriot,
2090 ffi::G_UNICODE_SCRIPT_LIMBU => Self::Limbu,
2091 ffi::G_UNICODE_SCRIPT_OSMANYA => Self::Osmanya,
2092 ffi::G_UNICODE_SCRIPT_SHAVIAN => Self::Shavian,
2093 ffi::G_UNICODE_SCRIPT_LINEAR_B => Self::LinearB,
2094 ffi::G_UNICODE_SCRIPT_TAI_LE => Self::TaiLe,
2095 ffi::G_UNICODE_SCRIPT_UGARITIC => Self::Ugaritic,
2096 ffi::G_UNICODE_SCRIPT_NEW_TAI_LUE => Self::NewTaiLue,
2097 ffi::G_UNICODE_SCRIPT_BUGINESE => Self::Buginese,
2098 ffi::G_UNICODE_SCRIPT_GLAGOLITIC => Self::Glagolitic,
2099 ffi::G_UNICODE_SCRIPT_TIFINAGH => Self::Tifinagh,
2100 ffi::G_UNICODE_SCRIPT_SYLOTI_NAGRI => Self::SylotiNagri,
2101 ffi::G_UNICODE_SCRIPT_OLD_PERSIAN => Self::OldPersian,
2102 ffi::G_UNICODE_SCRIPT_KHAROSHTHI => Self::Kharoshthi,
2103 ffi::G_UNICODE_SCRIPT_UNKNOWN => Self::Unknown,
2104 ffi::G_UNICODE_SCRIPT_BALINESE => Self::Balinese,
2105 ffi::G_UNICODE_SCRIPT_CUNEIFORM => Self::Cuneiform,
2106 ffi::G_UNICODE_SCRIPT_PHOENICIAN => Self::Phoenician,
2107 ffi::G_UNICODE_SCRIPT_PHAGS_PA => Self::PhagsPa,
2108 ffi::G_UNICODE_SCRIPT_NKO => Self::Nko,
2109 ffi::G_UNICODE_SCRIPT_KAYAH_LI => Self::KayahLi,
2110 ffi::G_UNICODE_SCRIPT_LEPCHA => Self::Lepcha,
2111 ffi::G_UNICODE_SCRIPT_REJANG => Self::Rejang,
2112 ffi::G_UNICODE_SCRIPT_SUNDANESE => Self::Sundanese,
2113 ffi::G_UNICODE_SCRIPT_SAURASHTRA => Self::Saurashtra,
2114 ffi::G_UNICODE_SCRIPT_CHAM => Self::Cham,
2115 ffi::G_UNICODE_SCRIPT_OL_CHIKI => Self::OlChiki,
2116 ffi::G_UNICODE_SCRIPT_VAI => Self::Vai,
2117 ffi::G_UNICODE_SCRIPT_CARIAN => Self::Carian,
2118 ffi::G_UNICODE_SCRIPT_LYCIAN => Self::Lycian,
2119 ffi::G_UNICODE_SCRIPT_LYDIAN => Self::Lydian,
2120 ffi::G_UNICODE_SCRIPT_AVESTAN => Self::Avestan,
2121 ffi::G_UNICODE_SCRIPT_BAMUM => Self::Bamum,
2122 ffi::G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS => Self::EgyptianHieroglyphs,
2123 ffi::G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC => Self::ImperialAramaic,
2124 ffi::G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI => Self::InscriptionalPahlavi,
2125 ffi::G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN => Self::InscriptionalParthian,
2126 ffi::G_UNICODE_SCRIPT_JAVANESE => Self::Javanese,
2127 ffi::G_UNICODE_SCRIPT_KAITHI => Self::Kaithi,
2128 ffi::G_UNICODE_SCRIPT_LISU => Self::Lisu,
2129 ffi::G_UNICODE_SCRIPT_MEETEI_MAYEK => Self::MeeteiMayek,
2130 ffi::G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN => Self::OldSouthArabian,
2131 ffi::G_UNICODE_SCRIPT_OLD_TURKIC => Self::OldTurkic,
2132 ffi::G_UNICODE_SCRIPT_SAMARITAN => Self::Samaritan,
2133 ffi::G_UNICODE_SCRIPT_TAI_THAM => Self::TaiTham,
2134 ffi::G_UNICODE_SCRIPT_TAI_VIET => Self::TaiViet,
2135 ffi::G_UNICODE_SCRIPT_BATAK => Self::Batak,
2136 ffi::G_UNICODE_SCRIPT_BRAHMI => Self::Brahmi,
2137 ffi::G_UNICODE_SCRIPT_MANDAIC => Self::Mandaic,
2138 ffi::G_UNICODE_SCRIPT_CHAKMA => Self::Chakma,
2139 ffi::G_UNICODE_SCRIPT_MEROITIC_CURSIVE => Self::MeroiticCursive,
2140 ffi::G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS => Self::MeroiticHieroglyphs,
2141 ffi::G_UNICODE_SCRIPT_MIAO => Self::Miao,
2142 ffi::G_UNICODE_SCRIPT_SHARADA => Self::Sharada,
2143 ffi::G_UNICODE_SCRIPT_SORA_SOMPENG => Self::SoraSompeng,
2144 ffi::G_UNICODE_SCRIPT_TAKRI => Self::Takri,
2145 ffi::G_UNICODE_SCRIPT_BASSA_VAH => Self::BassaVah,
2146 ffi::G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN => Self::CaucasianAlbanian,
2147 ffi::G_UNICODE_SCRIPT_DUPLOYAN => Self::Duployan,
2148 ffi::G_UNICODE_SCRIPT_ELBASAN => Self::Elbasan,
2149 ffi::G_UNICODE_SCRIPT_GRANTHA => Self::Grantha,
2150 ffi::G_UNICODE_SCRIPT_KHOJKI => Self::Khojki,
2151 ffi::G_UNICODE_SCRIPT_KHUDAWADI => Self::Khudawadi,
2152 ffi::G_UNICODE_SCRIPT_LINEAR_A => Self::LinearA,
2153 ffi::G_UNICODE_SCRIPT_MAHAJANI => Self::Mahajani,
2154 ffi::G_UNICODE_SCRIPT_MANICHAEAN => Self::Manichaean,
2155 ffi::G_UNICODE_SCRIPT_MENDE_KIKAKUI => Self::MendeKikakui,
2156 ffi::G_UNICODE_SCRIPT_MODI => Self::Modi,
2157 ffi::G_UNICODE_SCRIPT_MRO => Self::Mro,
2158 ffi::G_UNICODE_SCRIPT_NABATAEAN => Self::Nabataean,
2159 ffi::G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN => Self::OldNorthArabian,
2160 ffi::G_UNICODE_SCRIPT_OLD_PERMIC => Self::OldPermic,
2161 ffi::G_UNICODE_SCRIPT_PAHAWH_HMONG => Self::PahawhHmong,
2162 ffi::G_UNICODE_SCRIPT_PALMYRENE => Self::Palmyrene,
2163 ffi::G_UNICODE_SCRIPT_PAU_CIN_HAU => Self::PauCinHau,
2164 ffi::G_UNICODE_SCRIPT_PSALTER_PAHLAVI => Self::PsalterPahlavi,
2165 ffi::G_UNICODE_SCRIPT_SIDDHAM => Self::Siddham,
2166 ffi::G_UNICODE_SCRIPT_TIRHUTA => Self::Tirhuta,
2167 ffi::G_UNICODE_SCRIPT_WARANG_CITI => Self::WarangCiti,
2168 ffi::G_UNICODE_SCRIPT_AHOM => Self::Ahom,
2169 ffi::G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS => Self::AnatolianHieroglyphs,
2170 ffi::G_UNICODE_SCRIPT_HATRAN => Self::Hatran,
2171 ffi::G_UNICODE_SCRIPT_MULTANI => Self::Multani,
2172 ffi::G_UNICODE_SCRIPT_OLD_HUNGARIAN => Self::OldHungarian,
2173 ffi::G_UNICODE_SCRIPT_SIGNWRITING => Self::Signwriting,
2174 ffi::G_UNICODE_SCRIPT_ADLAM => Self::Adlam,
2175 ffi::G_UNICODE_SCRIPT_BHAIKSUKI => Self::Bhaiksuki,
2176 ffi::G_UNICODE_SCRIPT_MARCHEN => Self::Marchen,
2177 ffi::G_UNICODE_SCRIPT_NEWA => Self::Newa,
2178 ffi::G_UNICODE_SCRIPT_OSAGE => Self::Osage,
2179 ffi::G_UNICODE_SCRIPT_TANGUT => Self::Tangut,
2180 ffi::G_UNICODE_SCRIPT_MASARAM_GONDI => Self::MasaramGondi,
2181 ffi::G_UNICODE_SCRIPT_NUSHU => Self::Nushu,
2182 ffi::G_UNICODE_SCRIPT_SOYOMBO => Self::Soyombo,
2183 ffi::G_UNICODE_SCRIPT_ZANABAZAR_SQUARE => Self::ZanabazarSquare,
2184 ffi::G_UNICODE_SCRIPT_DOGRA => Self::Dogra,
2185 ffi::G_UNICODE_SCRIPT_GUNJALA_GONDI => Self::GunjalaGondi,
2186 ffi::G_UNICODE_SCRIPT_HANIFI_ROHINGYA => Self::HanifiRohingya,
2187 ffi::G_UNICODE_SCRIPT_MAKASAR => Self::Makasar,
2188 ffi::G_UNICODE_SCRIPT_MEDEFAIDRIN => Self::Medefaidrin,
2189 ffi::G_UNICODE_SCRIPT_OLD_SOGDIAN => Self::OldSogdian,
2190 ffi::G_UNICODE_SCRIPT_SOGDIAN => Self::Sogdian,
2191 ffi::G_UNICODE_SCRIPT_ELYMAIC => Self::Elymaic,
2192 ffi::G_UNICODE_SCRIPT_NANDINAGARI => Self::Nandinagari,
2193 ffi::G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG => Self::NyiakengPuachueHmong,
2194 ffi::G_UNICODE_SCRIPT_WANCHO => Self::Wancho,
2195 ffi::G_UNICODE_SCRIPT_CHORASMIAN => Self::Chorasmian,
2196 ffi::G_UNICODE_SCRIPT_DIVES_AKURU => Self::DivesAkuru,
2197 ffi::G_UNICODE_SCRIPT_KHITAN_SMALL_SCRIPT => Self::KhitanSmallScript,
2198 ffi::G_UNICODE_SCRIPT_YEZIDI => Self::Yezidi,
2199 #[cfg(feature = "v2_72")]
2200 ffi::G_UNICODE_SCRIPT_CYPRO_MINOAN => Self::CyproMinoan,
2201 #[cfg(feature = "v2_72")]
2202 ffi::G_UNICODE_SCRIPT_OLD_UYGHUR => Self::OldUyghur,
2203 #[cfg(feature = "v2_72")]
2204 ffi::G_UNICODE_SCRIPT_TANGSA => Self::Tangsa,
2205 #[cfg(feature = "v2_72")]
2206 ffi::G_UNICODE_SCRIPT_TOTO => Self::Toto,
2207 #[cfg(feature = "v2_72")]
2208 ffi::G_UNICODE_SCRIPT_VITHKUQI => Self::Vithkuqi,
2209 #[cfg(feature = "v2_72")]
2210 ffi::G_UNICODE_SCRIPT_MATH => Self::Math,
2211 #[cfg(feature = "v2_74")]
2212 ffi::G_UNICODE_SCRIPT_KAWI => Self::Kawi,
2213 #[cfg(feature = "v2_74")]
2214 ffi::G_UNICODE_SCRIPT_NAG_MUNDARI => Self::NagMundari,
2215 value => Self::__Unknown(value),
2216 }
2217 }
2218}
2219
2220#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2221#[non_exhaustive]
2222#[doc(alias = "GUnicodeType")]
2223pub enum UnicodeType {
2224 #[doc(alias = "G_UNICODE_CONTROL")]
2225 Control,
2226 #[doc(alias = "G_UNICODE_FORMAT")]
2227 Format,
2228 #[doc(alias = "G_UNICODE_UNASSIGNED")]
2229 Unassigned,
2230 #[doc(alias = "G_UNICODE_PRIVATE_USE")]
2231 PrivateUse,
2232 #[doc(alias = "G_UNICODE_SURROGATE")]
2233 Surrogate,
2234 #[doc(alias = "G_UNICODE_LOWERCASE_LETTER")]
2235 LowercaseLetter,
2236 #[doc(alias = "G_UNICODE_MODIFIER_LETTER")]
2237 ModifierLetter,
2238 #[doc(alias = "G_UNICODE_OTHER_LETTER")]
2239 OtherLetter,
2240 #[doc(alias = "G_UNICODE_TITLECASE_LETTER")]
2241 TitlecaseLetter,
2242 #[doc(alias = "G_UNICODE_UPPERCASE_LETTER")]
2243 UppercaseLetter,
2244 #[doc(alias = "G_UNICODE_SPACING_MARK")]
2245 SpacingMark,
2246 #[doc(alias = "G_UNICODE_ENCLOSING_MARK")]
2247 EnclosingMark,
2248 #[doc(alias = "G_UNICODE_NON_SPACING_MARK")]
2249 NonSpacingMark,
2250 #[doc(alias = "G_UNICODE_DECIMAL_NUMBER")]
2251 DecimalNumber,
2252 #[doc(alias = "G_UNICODE_LETTER_NUMBER")]
2253 LetterNumber,
2254 #[doc(alias = "G_UNICODE_OTHER_NUMBER")]
2255 OtherNumber,
2256 #[doc(alias = "G_UNICODE_CONNECT_PUNCTUATION")]
2257 ConnectPunctuation,
2258 #[doc(alias = "G_UNICODE_DASH_PUNCTUATION")]
2259 DashPunctuation,
2260 #[doc(alias = "G_UNICODE_CLOSE_PUNCTUATION")]
2261 ClosePunctuation,
2262 #[doc(alias = "G_UNICODE_FINAL_PUNCTUATION")]
2263 FinalPunctuation,
2264 #[doc(alias = "G_UNICODE_INITIAL_PUNCTUATION")]
2265 InitialPunctuation,
2266 #[doc(alias = "G_UNICODE_OTHER_PUNCTUATION")]
2267 OtherPunctuation,
2268 #[doc(alias = "G_UNICODE_OPEN_PUNCTUATION")]
2269 OpenPunctuation,
2270 #[doc(alias = "G_UNICODE_CURRENCY_SYMBOL")]
2271 CurrencySymbol,
2272 #[doc(alias = "G_UNICODE_MODIFIER_SYMBOL")]
2273 ModifierSymbol,
2274 #[doc(alias = "G_UNICODE_MATH_SYMBOL")]
2275 MathSymbol,
2276 #[doc(alias = "G_UNICODE_OTHER_SYMBOL")]
2277 OtherSymbol,
2278 #[doc(alias = "G_UNICODE_LINE_SEPARATOR")]
2279 LineSeparator,
2280 #[doc(alias = "G_UNICODE_PARAGRAPH_SEPARATOR")]
2281 ParagraphSeparator,
2282 #[doc(alias = "G_UNICODE_SPACE_SEPARATOR")]
2283 SpaceSeparator,
2284 #[doc(hidden)]
2285 __Unknown(i32),
2286}
2287
2288impl fmt::Display for UnicodeType {
2289 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2290 write!(
2291 f,
2292 "UnicodeType::{}",
2293 match *self {
2294 Self::Control => "Control",
2295 Self::Format => "Format",
2296 Self::Unassigned => "Unassigned",
2297 Self::PrivateUse => "PrivateUse",
2298 Self::Surrogate => "Surrogate",
2299 Self::LowercaseLetter => "LowercaseLetter",
2300 Self::ModifierLetter => "ModifierLetter",
2301 Self::OtherLetter => "OtherLetter",
2302 Self::TitlecaseLetter => "TitlecaseLetter",
2303 Self::UppercaseLetter => "UppercaseLetter",
2304 Self::SpacingMark => "SpacingMark",
2305 Self::EnclosingMark => "EnclosingMark",
2306 Self::NonSpacingMark => "NonSpacingMark",
2307 Self::DecimalNumber => "DecimalNumber",
2308 Self::LetterNumber => "LetterNumber",
2309 Self::OtherNumber => "OtherNumber",
2310 Self::ConnectPunctuation => "ConnectPunctuation",
2311 Self::DashPunctuation => "DashPunctuation",
2312 Self::ClosePunctuation => "ClosePunctuation",
2313 Self::FinalPunctuation => "FinalPunctuation",
2314 Self::InitialPunctuation => "InitialPunctuation",
2315 Self::OtherPunctuation => "OtherPunctuation",
2316 Self::OpenPunctuation => "OpenPunctuation",
2317 Self::CurrencySymbol => "CurrencySymbol",
2318 Self::ModifierSymbol => "ModifierSymbol",
2319 Self::MathSymbol => "MathSymbol",
2320 Self::OtherSymbol => "OtherSymbol",
2321 Self::LineSeparator => "LineSeparator",
2322 Self::ParagraphSeparator => "ParagraphSeparator",
2323 Self::SpaceSeparator => "SpaceSeparator",
2324 _ => "Unknown",
2325 }
2326 )
2327 }
2328}
2329
2330#[doc(hidden)]
2331impl IntoGlib for UnicodeType {
2332 type GlibType = ffi::GUnicodeType;
2333
2334 fn into_glib(self) -> ffi::GUnicodeType {
2335 match self {
2336 Self::Control => ffi::G_UNICODE_CONTROL,
2337 Self::Format => ffi::G_UNICODE_FORMAT,
2338 Self::Unassigned => ffi::G_UNICODE_UNASSIGNED,
2339 Self::PrivateUse => ffi::G_UNICODE_PRIVATE_USE,
2340 Self::Surrogate => ffi::G_UNICODE_SURROGATE,
2341 Self::LowercaseLetter => ffi::G_UNICODE_LOWERCASE_LETTER,
2342 Self::ModifierLetter => ffi::G_UNICODE_MODIFIER_LETTER,
2343 Self::OtherLetter => ffi::G_UNICODE_OTHER_LETTER,
2344 Self::TitlecaseLetter => ffi::G_UNICODE_TITLECASE_LETTER,
2345 Self::UppercaseLetter => ffi::G_UNICODE_UPPERCASE_LETTER,
2346 Self::SpacingMark => ffi::G_UNICODE_SPACING_MARK,
2347 Self::EnclosingMark => ffi::G_UNICODE_ENCLOSING_MARK,
2348 Self::NonSpacingMark => ffi::G_UNICODE_NON_SPACING_MARK,
2349 Self::DecimalNumber => ffi::G_UNICODE_DECIMAL_NUMBER,
2350 Self::LetterNumber => ffi::G_UNICODE_LETTER_NUMBER,
2351 Self::OtherNumber => ffi::G_UNICODE_OTHER_NUMBER,
2352 Self::ConnectPunctuation => ffi::G_UNICODE_CONNECT_PUNCTUATION,
2353 Self::DashPunctuation => ffi::G_UNICODE_DASH_PUNCTUATION,
2354 Self::ClosePunctuation => ffi::G_UNICODE_CLOSE_PUNCTUATION,
2355 Self::FinalPunctuation => ffi::G_UNICODE_FINAL_PUNCTUATION,
2356 Self::InitialPunctuation => ffi::G_UNICODE_INITIAL_PUNCTUATION,
2357 Self::OtherPunctuation => ffi::G_UNICODE_OTHER_PUNCTUATION,
2358 Self::OpenPunctuation => ffi::G_UNICODE_OPEN_PUNCTUATION,
2359 Self::CurrencySymbol => ffi::G_UNICODE_CURRENCY_SYMBOL,
2360 Self::ModifierSymbol => ffi::G_UNICODE_MODIFIER_SYMBOL,
2361 Self::MathSymbol => ffi::G_UNICODE_MATH_SYMBOL,
2362 Self::OtherSymbol => ffi::G_UNICODE_OTHER_SYMBOL,
2363 Self::LineSeparator => ffi::G_UNICODE_LINE_SEPARATOR,
2364 Self::ParagraphSeparator => ffi::G_UNICODE_PARAGRAPH_SEPARATOR,
2365 Self::SpaceSeparator => ffi::G_UNICODE_SPACE_SEPARATOR,
2366 Self::__Unknown(value) => value,
2367 }
2368 }
2369}
2370
2371#[doc(hidden)]
2372impl FromGlib<ffi::GUnicodeType> for UnicodeType {
2373 unsafe fn from_glib(value: ffi::GUnicodeType) -> Self {
2374 match value {
2375 ffi::G_UNICODE_CONTROL => Self::Control,
2376 ffi::G_UNICODE_FORMAT => Self::Format,
2377 ffi::G_UNICODE_UNASSIGNED => Self::Unassigned,
2378 ffi::G_UNICODE_PRIVATE_USE => Self::PrivateUse,
2379 ffi::G_UNICODE_SURROGATE => Self::Surrogate,
2380 ffi::G_UNICODE_LOWERCASE_LETTER => Self::LowercaseLetter,
2381 ffi::G_UNICODE_MODIFIER_LETTER => Self::ModifierLetter,
2382 ffi::G_UNICODE_OTHER_LETTER => Self::OtherLetter,
2383 ffi::G_UNICODE_TITLECASE_LETTER => Self::TitlecaseLetter,
2384 ffi::G_UNICODE_UPPERCASE_LETTER => Self::UppercaseLetter,
2385 ffi::G_UNICODE_SPACING_MARK => Self::SpacingMark,
2386 ffi::G_UNICODE_ENCLOSING_MARK => Self::EnclosingMark,
2387 ffi::G_UNICODE_NON_SPACING_MARK => Self::NonSpacingMark,
2388 ffi::G_UNICODE_DECIMAL_NUMBER => Self::DecimalNumber,
2389 ffi::G_UNICODE_LETTER_NUMBER => Self::LetterNumber,
2390 ffi::G_UNICODE_OTHER_NUMBER => Self::OtherNumber,
2391 ffi::G_UNICODE_CONNECT_PUNCTUATION => Self::ConnectPunctuation,
2392 ffi::G_UNICODE_DASH_PUNCTUATION => Self::DashPunctuation,
2393 ffi::G_UNICODE_CLOSE_PUNCTUATION => Self::ClosePunctuation,
2394 ffi::G_UNICODE_FINAL_PUNCTUATION => Self::FinalPunctuation,
2395 ffi::G_UNICODE_INITIAL_PUNCTUATION => Self::InitialPunctuation,
2396 ffi::G_UNICODE_OTHER_PUNCTUATION => Self::OtherPunctuation,
2397 ffi::G_UNICODE_OPEN_PUNCTUATION => Self::OpenPunctuation,
2398 ffi::G_UNICODE_CURRENCY_SYMBOL => Self::CurrencySymbol,
2399 ffi::G_UNICODE_MODIFIER_SYMBOL => Self::ModifierSymbol,
2400 ffi::G_UNICODE_MATH_SYMBOL => Self::MathSymbol,
2401 ffi::G_UNICODE_OTHER_SYMBOL => Self::OtherSymbol,
2402 ffi::G_UNICODE_LINE_SEPARATOR => Self::LineSeparator,
2403 ffi::G_UNICODE_PARAGRAPH_SEPARATOR => Self::ParagraphSeparator,
2404 ffi::G_UNICODE_SPACE_SEPARATOR => Self::SpaceSeparator,
2405 value => Self::__Unknown(value),
2406 }
2407 }
2408}
2409
2410#[cfg(feature = "v2_66")]
2411#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))]
2412#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2413#[non_exhaustive]
2414#[doc(alias = "GUriError")]
2415pub enum UriError {
2416 #[doc(alias = "G_URI_ERROR_FAILED")]
2417 Failed,
2418 #[doc(alias = "G_URI_ERROR_BAD_SCHEME")]
2419 BadScheme,
2420 #[doc(alias = "G_URI_ERROR_BAD_USER")]
2421 BadUser,
2422 #[doc(alias = "G_URI_ERROR_BAD_PASSWORD")]
2423 BadPassword,
2424 #[doc(alias = "G_URI_ERROR_BAD_AUTH_PARAMS")]
2425 BadAuthParams,
2426 #[doc(alias = "G_URI_ERROR_BAD_HOST")]
2427 BadHost,
2428 #[doc(alias = "G_URI_ERROR_BAD_PORT")]
2429 BadPort,
2430 #[doc(alias = "G_URI_ERROR_BAD_PATH")]
2431 BadPath,
2432 #[doc(alias = "G_URI_ERROR_BAD_QUERY")]
2433 BadQuery,
2434 #[doc(alias = "G_URI_ERROR_BAD_FRAGMENT")]
2435 BadFragment,
2436 #[doc(hidden)]
2437 __Unknown(i32),
2438}
2439
2440#[cfg(feature = "v2_66")]
2441#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))]
2442impl fmt::Display for UriError {
2443 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2444 write!(
2445 f,
2446 "UriError::{}",
2447 match *self {
2448 Self::Failed => "Failed",
2449 Self::BadScheme => "BadScheme",
2450 Self::BadUser => "BadUser",
2451 Self::BadPassword => "BadPassword",
2452 Self::BadAuthParams => "BadAuthParams",
2453 Self::BadHost => "BadHost",
2454 Self::BadPort => "BadPort",
2455 Self::BadPath => "BadPath",
2456 Self::BadQuery => "BadQuery",
2457 Self::BadFragment => "BadFragment",
2458 _ => "Unknown",
2459 }
2460 )
2461 }
2462}
2463
2464#[cfg(feature = "v2_66")]
2465#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))]
2466#[doc(hidden)]
2467impl IntoGlib for UriError {
2468 type GlibType = ffi::GUriError;
2469
2470 #[inline]
2471 fn into_glib(self) -> ffi::GUriError {
2472 match self {
2473 Self::Failed => ffi::G_URI_ERROR_FAILED,
2474 Self::BadScheme => ffi::G_URI_ERROR_BAD_SCHEME,
2475 Self::BadUser => ffi::G_URI_ERROR_BAD_USER,
2476 Self::BadPassword => ffi::G_URI_ERROR_BAD_PASSWORD,
2477 Self::BadAuthParams => ffi::G_URI_ERROR_BAD_AUTH_PARAMS,
2478 Self::BadHost => ffi::G_URI_ERROR_BAD_HOST,
2479 Self::BadPort => ffi::G_URI_ERROR_BAD_PORT,
2480 Self::BadPath => ffi::G_URI_ERROR_BAD_PATH,
2481 Self::BadQuery => ffi::G_URI_ERROR_BAD_QUERY,
2482 Self::BadFragment => ffi::G_URI_ERROR_BAD_FRAGMENT,
2483 Self::__Unknown(value) => value,
2484 }
2485 }
2486}
2487
2488#[cfg(feature = "v2_66")]
2489#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))]
2490#[doc(hidden)]
2491impl FromGlib<ffi::GUriError> for UriError {
2492 #[inline]
2493 unsafe fn from_glib(value: ffi::GUriError) -> Self {
2494 match value {
2495 ffi::G_URI_ERROR_FAILED => Self::Failed,
2496 ffi::G_URI_ERROR_BAD_SCHEME => Self::BadScheme,
2497 ffi::G_URI_ERROR_BAD_USER => Self::BadUser,
2498 ffi::G_URI_ERROR_BAD_PASSWORD => Self::BadPassword,
2499 ffi::G_URI_ERROR_BAD_AUTH_PARAMS => Self::BadAuthParams,
2500 ffi::G_URI_ERROR_BAD_HOST => Self::BadHost,
2501 ffi::G_URI_ERROR_BAD_PORT => Self::BadPort,
2502 ffi::G_URI_ERROR_BAD_PATH => Self::BadPath,
2503 ffi::G_URI_ERROR_BAD_QUERY => Self::BadQuery,
2504 ffi::G_URI_ERROR_BAD_FRAGMENT => Self::BadFragment,
2505 value => Self::__Unknown(value),
2506 }
2507 }
2508}
2509
2510#[cfg(feature = "v2_66")]
2511#[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))]
2512impl crate::error::ErrorDomain for UriError {
2513 #[inline]
2514 fn domain() -> crate::Quark {
2515 unsafe { from_glib(ffi::g_uri_error_quark()) }
2516 }
2517
2518 #[inline]
2519 fn code(self) -> i32 {
2520 self.into_glib()
2521 }
2522
2523 #[inline]
2524 #[allow(clippy::match_single_binding)]
2525 fn from(code: i32) -> Option<Self> {
2526 match unsafe { from_glib(code) } {
2527 Self::__Unknown(_) => Some(Self::Failed),
2528 value => Some(value),
2529 }
2530 }
2531}
2532
2533#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2534#[non_exhaustive]
2535#[doc(alias = "GVariantClass")]
2536pub enum VariantClass {
2537 #[doc(alias = "G_VARIANT_CLASS_BOOLEAN")]
2538 Boolean,
2539 #[doc(alias = "G_VARIANT_CLASS_BYTE")]
2540 Byte,
2541 #[doc(alias = "G_VARIANT_CLASS_INT16")]
2542 Int16,
2543 #[doc(alias = "G_VARIANT_CLASS_UINT16")]
2544 Uint16,
2545 #[doc(alias = "G_VARIANT_CLASS_INT32")]
2546 Int32,
2547 #[doc(alias = "G_VARIANT_CLASS_UINT32")]
2548 Uint32,
2549 #[doc(alias = "G_VARIANT_CLASS_INT64")]
2550 Int64,
2551 #[doc(alias = "G_VARIANT_CLASS_UINT64")]
2552 Uint64,
2553 #[doc(alias = "G_VARIANT_CLASS_HANDLE")]
2554 Handle,
2555 #[doc(alias = "G_VARIANT_CLASS_DOUBLE")]
2556 Double,
2557 #[doc(alias = "G_VARIANT_CLASS_STRING")]
2558 String,
2559 #[doc(alias = "G_VARIANT_CLASS_OBJECT_PATH")]
2560 ObjectPath,
2561 #[doc(alias = "G_VARIANT_CLASS_SIGNATURE")]
2562 Signature,
2563 #[doc(alias = "G_VARIANT_CLASS_VARIANT")]
2564 Variant,
2565 #[doc(alias = "G_VARIANT_CLASS_MAYBE")]
2566 Maybe,
2567 #[doc(alias = "G_VARIANT_CLASS_ARRAY")]
2568 Array,
2569 #[doc(alias = "G_VARIANT_CLASS_TUPLE")]
2570 Tuple,
2571 #[doc(alias = "G_VARIANT_CLASS_DICT_ENTRY")]
2572 DictEntry,
2573 #[doc(hidden)]
2574 __Unknown(i32),
2575}
2576
2577impl fmt::Display for VariantClass {
2578 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2579 write!(
2580 f,
2581 "VariantClass::{}",
2582 match *self {
2583 Self::Boolean => "Boolean",
2584 Self::Byte => "Byte",
2585 Self::Int16 => "Int16",
2586 Self::Uint16 => "Uint16",
2587 Self::Int32 => "Int32",
2588 Self::Uint32 => "Uint32",
2589 Self::Int64 => "Int64",
2590 Self::Uint64 => "Uint64",
2591 Self::Handle => "Handle",
2592 Self::Double => "Double",
2593 Self::String => "String",
2594 Self::ObjectPath => "ObjectPath",
2595 Self::Signature => "Signature",
2596 Self::Variant => "Variant",
2597 Self::Maybe => "Maybe",
2598 Self::Array => "Array",
2599 Self::Tuple => "Tuple",
2600 Self::DictEntry => "DictEntry",
2601 _ => "Unknown",
2602 }
2603 )
2604 }
2605}
2606
2607#[doc(hidden)]
2608impl IntoGlib for VariantClass {
2609 type GlibType = ffi::GVariantClass;
2610
2611 fn into_glib(self) -> ffi::GVariantClass {
2612 match self {
2613 Self::Boolean => ffi::G_VARIANT_CLASS_BOOLEAN,
2614 Self::Byte => ffi::G_VARIANT_CLASS_BYTE,
2615 Self::Int16 => ffi::G_VARIANT_CLASS_INT16,
2616 Self::Uint16 => ffi::G_VARIANT_CLASS_UINT16,
2617 Self::Int32 => ffi::G_VARIANT_CLASS_INT32,
2618 Self::Uint32 => ffi::G_VARIANT_CLASS_UINT32,
2619 Self::Int64 => ffi::G_VARIANT_CLASS_INT64,
2620 Self::Uint64 => ffi::G_VARIANT_CLASS_UINT64,
2621 Self::Handle => ffi::G_VARIANT_CLASS_HANDLE,
2622 Self::Double => ffi::G_VARIANT_CLASS_DOUBLE,
2623 Self::String => ffi::G_VARIANT_CLASS_STRING,
2624 Self::ObjectPath => ffi::G_VARIANT_CLASS_OBJECT_PATH,
2625 Self::Signature => ffi::G_VARIANT_CLASS_SIGNATURE,
2626 Self::Variant => ffi::G_VARIANT_CLASS_VARIANT,
2627 Self::Maybe => ffi::G_VARIANT_CLASS_MAYBE,
2628 Self::Array => ffi::G_VARIANT_CLASS_ARRAY,
2629 Self::Tuple => ffi::G_VARIANT_CLASS_TUPLE,
2630 Self::DictEntry => ffi::G_VARIANT_CLASS_DICT_ENTRY,
2631 Self::__Unknown(value) => value,
2632 }
2633 }
2634}
2635
2636#[doc(hidden)]
2637impl FromGlib<ffi::GVariantClass> for VariantClass {
2638 unsafe fn from_glib(value: ffi::GVariantClass) -> Self {
2639 match value {
2640 ffi::G_VARIANT_CLASS_BOOLEAN => Self::Boolean,
2641 ffi::G_VARIANT_CLASS_BYTE => Self::Byte,
2642 ffi::G_VARIANT_CLASS_INT16 => Self::Int16,
2643 ffi::G_VARIANT_CLASS_UINT16 => Self::Uint16,
2644 ffi::G_VARIANT_CLASS_INT32 => Self::Int32,
2645 ffi::G_VARIANT_CLASS_UINT32 => Self::Uint32,
2646 ffi::G_VARIANT_CLASS_INT64 => Self::Int64,
2647 ffi::G_VARIANT_CLASS_UINT64 => Self::Uint64,
2648 ffi::G_VARIANT_CLASS_HANDLE => Self::Handle,
2649 ffi::G_VARIANT_CLASS_DOUBLE => Self::Double,
2650 ffi::G_VARIANT_CLASS_STRING => Self::String,
2651 ffi::G_VARIANT_CLASS_OBJECT_PATH => Self::ObjectPath,
2652 ffi::G_VARIANT_CLASS_SIGNATURE => Self::Signature,
2653 ffi::G_VARIANT_CLASS_VARIANT => Self::Variant,
2654 ffi::G_VARIANT_CLASS_MAYBE => Self::Maybe,
2655 ffi::G_VARIANT_CLASS_ARRAY => Self::Array,
2656 ffi::G_VARIANT_CLASS_TUPLE => Self::Tuple,
2657 ffi::G_VARIANT_CLASS_DICT_ENTRY => Self::DictEntry,
2658 value => Self::__Unknown(value),
2659 }
2660 }
2661}
2662