1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
use bitflags::bitflags;
use glib::translate::*;
use glib::value::FromValue;
use glib::value::ToValue;
use glib::StaticType;
use glib::Type;
use std::fmt;
bitflags! {
#[doc(alias = "GdkAnchorHints")]
pub struct AnchorHints: u32 {
#[doc(alias = "GDK_ANCHOR_FLIP_X")]
const FLIP_X = ffi::GDK_ANCHOR_FLIP_X as u32;
#[doc(alias = "GDK_ANCHOR_FLIP_Y")]
const FLIP_Y = ffi::GDK_ANCHOR_FLIP_Y as u32;
#[doc(alias = "GDK_ANCHOR_SLIDE_X")]
const SLIDE_X = ffi::GDK_ANCHOR_SLIDE_X as u32;
#[doc(alias = "GDK_ANCHOR_SLIDE_Y")]
const SLIDE_Y = ffi::GDK_ANCHOR_SLIDE_Y as u32;
#[doc(alias = "GDK_ANCHOR_RESIZE_X")]
const RESIZE_X = ffi::GDK_ANCHOR_RESIZE_X as u32;
#[doc(alias = "GDK_ANCHOR_RESIZE_Y")]
const RESIZE_Y = ffi::GDK_ANCHOR_RESIZE_Y as u32;
#[doc(alias = "GDK_ANCHOR_FLIP")]
const FLIP = ffi::GDK_ANCHOR_FLIP as u32;
#[doc(alias = "GDK_ANCHOR_SLIDE")]
const SLIDE = ffi::GDK_ANCHOR_SLIDE as u32;
#[doc(alias = "GDK_ANCHOR_RESIZE")]
const RESIZE = ffi::GDK_ANCHOR_RESIZE as u32;
}
}
impl fmt::Display for AnchorHints {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for AnchorHints {
type GlibType = ffi::GdkAnchorHints;
fn into_glib(self) -> ffi::GdkAnchorHints {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkAnchorHints> for AnchorHints {
unsafe fn from_glib(value: ffi::GdkAnchorHints) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for AnchorHints {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_anchor_hints_get_type()) }
}
}
impl glib::value::ValueType for AnchorHints {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for AnchorHints {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for AnchorHints {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
#[doc(alias = "GdkAxisFlags")]
pub struct AxisFlags: u32 {
#[doc(alias = "GDK_AXIS_FLAG_X")]
const X = ffi::GDK_AXIS_FLAG_X as u32;
#[doc(alias = "GDK_AXIS_FLAG_Y")]
const Y = ffi::GDK_AXIS_FLAG_Y as u32;
#[doc(alias = "GDK_AXIS_FLAG_DELTA_X")]
const DELTA_X = ffi::GDK_AXIS_FLAG_DELTA_X as u32;
#[doc(alias = "GDK_AXIS_FLAG_DELTA_Y")]
const DELTA_Y = ffi::GDK_AXIS_FLAG_DELTA_Y as u32;
#[doc(alias = "GDK_AXIS_FLAG_PRESSURE")]
const PRESSURE = ffi::GDK_AXIS_FLAG_PRESSURE as u32;
#[doc(alias = "GDK_AXIS_FLAG_XTILT")]
const XTILT = ffi::GDK_AXIS_FLAG_XTILT as u32;
#[doc(alias = "GDK_AXIS_FLAG_YTILT")]
const YTILT = ffi::GDK_AXIS_FLAG_YTILT as u32;
#[doc(alias = "GDK_AXIS_FLAG_WHEEL")]
const WHEEL = ffi::GDK_AXIS_FLAG_WHEEL as u32;
#[doc(alias = "GDK_AXIS_FLAG_DISTANCE")]
const DISTANCE = ffi::GDK_AXIS_FLAG_DISTANCE as u32;
#[doc(alias = "GDK_AXIS_FLAG_ROTATION")]
const ROTATION = ffi::GDK_AXIS_FLAG_ROTATION as u32;
#[doc(alias = "GDK_AXIS_FLAG_SLIDER")]
const SLIDER = ffi::GDK_AXIS_FLAG_SLIDER as u32;
}
}
impl fmt::Display for AxisFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for AxisFlags {
type GlibType = ffi::GdkAxisFlags;
fn into_glib(self) -> ffi::GdkAxisFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkAxisFlags> for AxisFlags {
unsafe fn from_glib(value: ffi::GdkAxisFlags) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for AxisFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_axis_flags_get_type()) }
}
}
impl glib::value::ValueType for AxisFlags {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for AxisFlags {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for AxisFlags {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
#[doc(alias = "GdkDragAction")]
pub struct DragAction: u32 {
#[doc(alias = "GDK_ACTION_COPY")]
const COPY = ffi::GDK_ACTION_COPY as u32;
#[doc(alias = "GDK_ACTION_MOVE")]
const MOVE = ffi::GDK_ACTION_MOVE as u32;
#[doc(alias = "GDK_ACTION_LINK")]
const LINK = ffi::GDK_ACTION_LINK as u32;
#[doc(alias = "GDK_ACTION_ASK")]
const ASK = ffi::GDK_ACTION_ASK as u32;
}
}
impl DragAction {
#[doc(alias = "gdk_drag_action_is_unique")]
pub fn is_unique(self) -> bool {
assert_initialized_main_thread!();
unsafe { from_glib(ffi::gdk_drag_action_is_unique(self.into_glib())) }
}
}
impl fmt::Display for DragAction {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for DragAction {
type GlibType = ffi::GdkDragAction;
fn into_glib(self) -> ffi::GdkDragAction {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkDragAction> for DragAction {
unsafe fn from_glib(value: ffi::GdkDragAction) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for DragAction {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_drag_action_get_type()) }
}
}
impl glib::value::ValueType for DragAction {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for DragAction {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for DragAction {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
#[doc(alias = "GdkFrameClockPhase")]
pub struct FrameClockPhase: u32 {
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_NONE")]
const NONE = ffi::GDK_FRAME_CLOCK_PHASE_NONE as u32;
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS")]
const FLUSH_EVENTS = ffi::GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS as u32;
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT")]
const BEFORE_PAINT = ffi::GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT as u32;
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_UPDATE")]
const UPDATE = ffi::GDK_FRAME_CLOCK_PHASE_UPDATE as u32;
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_LAYOUT")]
const LAYOUT = ffi::GDK_FRAME_CLOCK_PHASE_LAYOUT as u32;
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_PAINT")]
const PAINT = ffi::GDK_FRAME_CLOCK_PHASE_PAINT as u32;
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS")]
const RESUME_EVENTS = ffi::GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS as u32;
#[doc(alias = "GDK_FRAME_CLOCK_PHASE_AFTER_PAINT")]
const AFTER_PAINT = ffi::GDK_FRAME_CLOCK_PHASE_AFTER_PAINT as u32;
}
}
impl fmt::Display for FrameClockPhase {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for FrameClockPhase {
type GlibType = ffi::GdkFrameClockPhase;
fn into_glib(self) -> ffi::GdkFrameClockPhase {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkFrameClockPhase> for FrameClockPhase {
unsafe fn from_glib(value: ffi::GdkFrameClockPhase) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for FrameClockPhase {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_frame_clock_phase_get_type()) }
}
}
impl glib::value::ValueType for FrameClockPhase {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for FrameClockPhase {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for FrameClockPhase {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
bitflags! {
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
#[doc(alias = "GdkGLAPI")]
pub struct GLAPI: u32 {
#[doc(alias = "GDK_GL_API_GL")]
const GL = ffi::GDK_GL_API_GL as u32;
#[doc(alias = "GDK_GL_API_GLES")]
const GLES = ffi::GDK_GL_API_GLES as u32;
}
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
impl fmt::Display for GLAPI {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
#[doc(hidden)]
impl IntoGlib for GLAPI {
type GlibType = ffi::GdkGLAPI;
fn into_glib(self) -> ffi::GdkGLAPI {
self.bits()
}
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
#[doc(hidden)]
impl FromGlib<ffi::GdkGLAPI> for GLAPI {
unsafe fn from_glib(value: ffi::GdkGLAPI) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
impl StaticType for GLAPI {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_gl_api_get_type()) }
}
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
impl glib::value::ValueType for GLAPI {
type Type = Self;
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
unsafe impl<'a> FromValue<'a> for GLAPI {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
#[cfg(any(feature = "v4_6", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_6")))]
impl ToValue for GLAPI {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
#[doc(alias = "GdkModifierType")]
pub struct ModifierType: u32 {
#[doc(alias = "GDK_SHIFT_MASK")]
const SHIFT_MASK = ffi::GDK_SHIFT_MASK as u32;
#[doc(alias = "GDK_LOCK_MASK")]
const LOCK_MASK = ffi::GDK_LOCK_MASK as u32;
#[doc(alias = "GDK_CONTROL_MASK")]
const CONTROL_MASK = ffi::GDK_CONTROL_MASK as u32;
#[doc(alias = "GDK_ALT_MASK")]
const ALT_MASK = ffi::GDK_ALT_MASK as u32;
#[doc(alias = "GDK_BUTTON1_MASK")]
const BUTTON1_MASK = ffi::GDK_BUTTON1_MASK as u32;
#[doc(alias = "GDK_BUTTON2_MASK")]
const BUTTON2_MASK = ffi::GDK_BUTTON2_MASK as u32;
#[doc(alias = "GDK_BUTTON3_MASK")]
const BUTTON3_MASK = ffi::GDK_BUTTON3_MASK as u32;
#[doc(alias = "GDK_BUTTON4_MASK")]
const BUTTON4_MASK = ffi::GDK_BUTTON4_MASK as u32;
#[doc(alias = "GDK_BUTTON5_MASK")]
const BUTTON5_MASK = ffi::GDK_BUTTON5_MASK as u32;
#[doc(alias = "GDK_SUPER_MASK")]
const SUPER_MASK = ffi::GDK_SUPER_MASK as u32;
#[doc(alias = "GDK_HYPER_MASK")]
const HYPER_MASK = ffi::GDK_HYPER_MASK as u32;
#[doc(alias = "GDK_META_MASK")]
const META_MASK = ffi::GDK_META_MASK as u32;
}
}
impl fmt::Display for ModifierType {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for ModifierType {
type GlibType = ffi::GdkModifierType;
fn into_glib(self) -> ffi::GdkModifierType {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkModifierType> for ModifierType {
unsafe fn from_glib(value: ffi::GdkModifierType) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for ModifierType {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_modifier_type_get_type()) }
}
}
impl glib::value::ValueType for ModifierType {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for ModifierType {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for ModifierType {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
#[doc(alias = "GdkPaintableFlags")]
pub struct PaintableFlags: u32 {
#[doc(alias = "GDK_PAINTABLE_STATIC_SIZE")]
const SIZE = ffi::GDK_PAINTABLE_STATIC_SIZE as u32;
#[doc(alias = "GDK_PAINTABLE_STATIC_CONTENTS")]
const CONTENTS = ffi::GDK_PAINTABLE_STATIC_CONTENTS as u32;
}
}
impl fmt::Display for PaintableFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for PaintableFlags {
type GlibType = ffi::GdkPaintableFlags;
fn into_glib(self) -> ffi::GdkPaintableFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkPaintableFlags> for PaintableFlags {
unsafe fn from_glib(value: ffi::GdkPaintableFlags) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for PaintableFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_paintable_flags_get_type()) }
}
}
impl glib::value::ValueType for PaintableFlags {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for PaintableFlags {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for PaintableFlags {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
#[doc(alias = "GdkSeatCapabilities")]
pub struct SeatCapabilities: u32 {
#[doc(alias = "GDK_SEAT_CAPABILITY_NONE")]
const NONE = ffi::GDK_SEAT_CAPABILITY_NONE as u32;
#[doc(alias = "GDK_SEAT_CAPABILITY_POINTER")]
const POINTER = ffi::GDK_SEAT_CAPABILITY_POINTER as u32;
#[doc(alias = "GDK_SEAT_CAPABILITY_TOUCH")]
const TOUCH = ffi::GDK_SEAT_CAPABILITY_TOUCH as u32;
#[doc(alias = "GDK_SEAT_CAPABILITY_TABLET_STYLUS")]
const TABLET_STYLUS = ffi::GDK_SEAT_CAPABILITY_TABLET_STYLUS as u32;
#[doc(alias = "GDK_SEAT_CAPABILITY_KEYBOARD")]
const KEYBOARD = ffi::GDK_SEAT_CAPABILITY_KEYBOARD as u32;
#[doc(alias = "GDK_SEAT_CAPABILITY_TABLET_PAD")]
const TABLET_PAD = ffi::GDK_SEAT_CAPABILITY_TABLET_PAD as u32;
#[doc(alias = "GDK_SEAT_CAPABILITY_ALL_POINTING")]
const ALL_POINTING = ffi::GDK_SEAT_CAPABILITY_ALL_POINTING as u32;
#[doc(alias = "GDK_SEAT_CAPABILITY_ALL")]
const ALL = ffi::GDK_SEAT_CAPABILITY_ALL as u32;
}
}
impl fmt::Display for SeatCapabilities {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for SeatCapabilities {
type GlibType = ffi::GdkSeatCapabilities;
fn into_glib(self) -> ffi::GdkSeatCapabilities {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkSeatCapabilities> for SeatCapabilities {
unsafe fn from_glib(value: ffi::GdkSeatCapabilities) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for SeatCapabilities {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_seat_capabilities_get_type()) }
}
}
impl glib::value::ValueType for SeatCapabilities {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for SeatCapabilities {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for SeatCapabilities {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
bitflags! {
#[doc(alias = "GdkToplevelState")]
pub struct ToplevelState: u32 {
#[doc(alias = "GDK_TOPLEVEL_STATE_MINIMIZED")]
const MINIMIZED = ffi::GDK_TOPLEVEL_STATE_MINIMIZED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_MAXIMIZED")]
const MAXIMIZED = ffi::GDK_TOPLEVEL_STATE_MAXIMIZED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_STICKY")]
const STICKY = ffi::GDK_TOPLEVEL_STATE_STICKY as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_FULLSCREEN")]
const FULLSCREEN = ffi::GDK_TOPLEVEL_STATE_FULLSCREEN as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_ABOVE")]
const ABOVE = ffi::GDK_TOPLEVEL_STATE_ABOVE as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_BELOW")]
const BELOW = ffi::GDK_TOPLEVEL_STATE_BELOW as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_FOCUSED")]
const FOCUSED = ffi::GDK_TOPLEVEL_STATE_FOCUSED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_TILED")]
const TILED = ffi::GDK_TOPLEVEL_STATE_TILED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_TOP_TILED")]
const TOP_TILED = ffi::GDK_TOPLEVEL_STATE_TOP_TILED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_TOP_RESIZABLE")]
const TOP_RESIZABLE = ffi::GDK_TOPLEVEL_STATE_TOP_RESIZABLE as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_RIGHT_TILED")]
const RIGHT_TILED = ffi::GDK_TOPLEVEL_STATE_RIGHT_TILED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE")]
const RIGHT_RESIZABLE = ffi::GDK_TOPLEVEL_STATE_RIGHT_RESIZABLE as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_BOTTOM_TILED")]
const BOTTOM_TILED = ffi::GDK_TOPLEVEL_STATE_BOTTOM_TILED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE")]
const BOTTOM_RESIZABLE = ffi::GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_LEFT_TILED")]
const LEFT_TILED = ffi::GDK_TOPLEVEL_STATE_LEFT_TILED as u32;
#[doc(alias = "GDK_TOPLEVEL_STATE_LEFT_RESIZABLE")]
const LEFT_RESIZABLE = ffi::GDK_TOPLEVEL_STATE_LEFT_RESIZABLE as u32;
}
}
impl fmt::Display for ToplevelState {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for ToplevelState {
type GlibType = ffi::GdkToplevelState;
fn into_glib(self) -> ffi::GdkToplevelState {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GdkToplevelState> for ToplevelState {
unsafe fn from_glib(value: ffi::GdkToplevelState) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for ToplevelState {
fn static_type() -> Type {
unsafe { from_glib(ffi::gdk_toplevel_state_get_type()) }
}
}
impl glib::value::ValueType for ToplevelState {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for ToplevelState {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for ToplevelState {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}