gir_ffi-pretty_printer 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,9 @@ module GObject
38
38
  def unbind
39
39
  GObject::Lib.g_binding_unbind(self)
40
40
  end
41
+ alias_method 'flags', 'get_flags'
42
+ alias_method 'source', 'get_source'
43
+ alias_method 'target', 'get_target'
41
44
  end
42
45
  # XXX: Don't know how to print flags
43
46
  # XXX: Don't know how to print callback
@@ -252,23 +255,23 @@ module GObject
252
255
  GObject::Lib.g_cclosure_marshal_generic(_v1, _v2, _v3, _v4, _v5, _v6)
253
256
  end
254
257
  def callback
255
- _v1 = (@struct.to_ptr + 64)
256
- _v2 = _v1.get_pointer(0)
258
+ _v1 = @struct.to_ptr
259
+ _v2 = _v1.get_pointer(64)
257
260
  _v2
258
261
  end
259
262
  def callback=(value)
260
- _v1 = (@struct.to_ptr + 64)
263
+ _v1 = @struct.to_ptr
261
264
  _v2 = value
262
- _v1.put_pointer(0, _v2)
265
+ _v1.put_pointer(64, _v2)
263
266
  end
264
267
  def closure
265
- _v1 = (@struct.to_ptr + 0)
268
+ _v1 = @struct.to_ptr
266
269
  _v2 = GObject::Closure.get_value_from_pointer(_v1, 0)
267
270
  _v3 = GObject::Closure.wrap(_v2)
268
271
  _v3
269
272
  end
270
273
  def closure=(value)
271
- _v1 = (@struct.to_ptr + 0)
274
+ _v1 = @struct.to_ptr
272
275
  _v2 = GObject::Closure.copy_from(value)
273
276
  GObject::Closure.copy_value_to_pointer(_v2, _v1)
274
277
  end
@@ -290,34 +293,34 @@ module GObject
290
293
  obj
291
294
  end
292
295
  def data
293
- _v1 = (@struct.to_ptr + 48)
294
- _v2 = _v1.get_pointer(0)
296
+ _v1 = @struct.to_ptr
297
+ _v2 = _v1.get_pointer(48)
295
298
  _v2
296
299
  end
297
300
  def derivative_flag
298
- _v1 = (@struct.to_ptr + 28)
299
- _v2 = _v1.get_uint32(0)
301
+ _v1 = @struct.to_ptr
302
+ _v2 = _v1.get_uint32(28)
300
303
  _v2
301
304
  end
302
305
  def floating
303
- _v1 = (@struct.to_ptr + 24)
304
- _v2 = _v1.get_uint32(0)
306
+ _v1 = @struct.to_ptr
307
+ _v2 = _v1.get_uint32(24)
305
308
  _v2
306
309
  end
307
310
  def in_inotify
308
- _v1 = (@struct.to_ptr + 20)
309
- _v2 = _v1.get_uint32(0)
311
+ _v1 = @struct.to_ptr
312
+ _v2 = _v1.get_uint32(20)
310
313
  _v2
311
314
  end
312
315
  def in_marshal
313
- _v1 = (@struct.to_ptr + 32)
314
- _v2 = _v1.get_uint32(0)
316
+ _v1 = @struct.to_ptr
317
+ _v2 = _v1.get_uint32(32)
315
318
  _v2
316
319
  end
317
320
  def in_marshal=(value)
318
- _v1 = (@struct.to_ptr + 32)
321
+ _v1 = @struct.to_ptr
319
322
  _v2 = value
320
- _v1.put_uint32(0, _v2)
323
+ _v1.put_uint32(32, _v2)
321
324
  end
322
325
  def initialize_object(sizeof_closure, object)
323
326
  _v1 = sizeof_closure
@@ -353,43 +356,43 @@ module GObject
353
356
  rval.get_value
354
357
  end
355
358
  def is_invalid
356
- _v1 = (@struct.to_ptr + 36)
357
- _v2 = _v1.get_uint32(0)
359
+ _v1 = @struct.to_ptr
360
+ _v2 = _v1.get_uint32(36)
358
361
  _v2
359
362
  end
360
363
  def is_invalid=(value)
361
- _v1 = (@struct.to_ptr + 36)
364
+ _v1 = @struct.to_ptr
362
365
  _v2 = value
363
- _v1.put_uint32(0, _v2)
366
+ _v1.put_uint32(36, _v2)
364
367
  end
365
368
  def marshal
366
- _v1 = (@struct.to_ptr + 40)
367
- _v2 = GObject::Marshal.get_value_from_pointer(_v1, 0)
369
+ _v1 = @struct.to_ptr
370
+ _v2 = GObject::Marshal.get_value_from_pointer(_v1, 40)
368
371
  _v2
369
372
  end
370
373
  def meta_marshal_nouse
371
- _v1 = (@struct.to_ptr + 4)
372
- _v2 = _v1.get_uint32(0)
374
+ _v1 = @struct.to_ptr
375
+ _v2 = _v1.get_uint32(4)
373
376
  _v2
374
377
  end
375
378
  def n_fnotifiers
376
- _v1 = (@struct.to_ptr + 12)
377
- _v2 = _v1.get_uint32(0)
379
+ _v1 = @struct.to_ptr
380
+ _v2 = _v1.get_uint32(12)
378
381
  _v2
379
382
  end
380
383
  def n_guards
381
- _v1 = (@struct.to_ptr + 8)
382
- _v2 = _v1.get_uint32(0)
384
+ _v1 = @struct.to_ptr
385
+ _v2 = _v1.get_uint32(8)
383
386
  _v2
384
387
  end
385
388
  def n_inotifiers
386
- _v1 = (@struct.to_ptr + 16)
387
- _v2 = _v1.get_uint32(0)
389
+ _v1 = @struct.to_ptr
390
+ _v2 = _v1.get_uint32(16)
388
391
  _v2
389
392
  end
390
393
  def notifiers
391
- _v1 = (@struct.to_ptr + 56)
392
- _v2 = _v1.get_pointer(0)
394
+ _v1 = @struct.to_ptr
395
+ _v2 = _v1.get_pointer(56)
393
396
  _v3 = GObject::ClosureNotifyData.wrap(_v2)
394
397
  _v3
395
398
  end
@@ -399,7 +402,7 @@ module GObject
399
402
  return _v2
400
403
  end
401
404
  def ref_count
402
- _v1 = (@struct.to_ptr + 0)
405
+ _v1 = @struct.to_ptr
403
406
  _v2 = _v1.get_uint32(0)
404
407
  _v2
405
408
  end
@@ -427,210 +430,199 @@ module GObject
427
430
  class GObject::ClosureNotifyData < GirFFI::StructBase
428
431
 
429
432
  def data
430
- _v1 = (@struct.to_ptr + 0)
433
+ _v1 = @struct.to_ptr
431
434
  _v2 = _v1.get_pointer(0)
432
435
  _v2
433
436
  end
434
437
  def data=(value)
435
- _v1 = (@struct.to_ptr + 0)
438
+ _v1 = @struct.to_ptr
436
439
  _v2 = value
437
440
  _v1.put_pointer(0, _v2)
438
441
  end
439
442
  def notify
440
- _v1 = (@struct.to_ptr + 8)
441
- _v2 = GObject::ClosureNotify.get_value_from_pointer(_v1, 0)
443
+ _v1 = @struct.to_ptr
444
+ _v2 = GObject::ClosureNotify.get_value_from_pointer(_v1, 8)
442
445
  _v2
443
446
  end
444
447
  def notify=(value)
445
- _v1 = (@struct.to_ptr + 8)
448
+ _v1 = @struct.to_ptr
446
449
  _v2 = GObject::ClosureNotify.from(value)
447
- GObject::ClosureNotify.copy_value_to_pointer(_v2, _v1)
450
+ GObject::ClosureNotify.copy_value_to_pointer(_v2, _v1, 8)
448
451
  end
449
452
  end
450
453
  # XXX: Don't know how to print flags
451
454
  class GObject::EnumClass < GirFFI::StructBase
452
455
 
453
456
  def g_type_class
454
- _v1 = (@struct.to_ptr + 0)
457
+ _v1 = @struct.to_ptr
455
458
  _v2 = GObject::TypeClass.get_value_from_pointer(_v1, 0)
456
459
  _v3 = GObject::TypeClass.wrap(_v2)
457
460
  _v3
458
461
  end
459
462
  def g_type_class=(value)
460
- _v1 = (@struct.to_ptr + 0)
463
+ _v1 = @struct.to_ptr
461
464
  _v2 = GObject::TypeClass.copy_from(value)
462
465
  GObject::TypeClass.copy_value_to_pointer(_v2, _v1)
463
466
  end
464
467
  def maximum
465
- _v1 = (@struct.to_ptr + 12)
466
- _v2 = _v1.get_int32(0)
468
+ _v1 = @struct.to_ptr
469
+ _v2 = _v1.get_int32(12)
467
470
  _v2
468
471
  end
469
472
  def maximum=(value)
470
- _v1 = (@struct.to_ptr + 12)
473
+ _v1 = @struct.to_ptr
471
474
  _v2 = value
472
- _v1.put_int32(0, _v2)
475
+ _v1.put_int32(12, _v2)
473
476
  end
474
477
  def minimum
475
- _v1 = (@struct.to_ptr + 8)
476
- _v2 = _v1.get_int32(0)
478
+ _v1 = @struct.to_ptr
479
+ _v2 = _v1.get_int32(8)
477
480
  _v2
478
481
  end
479
482
  def minimum=(value)
480
- _v1 = (@struct.to_ptr + 8)
483
+ _v1 = @struct.to_ptr
481
484
  _v2 = value
482
- _v1.put_int32(0, _v2)
485
+ _v1.put_int32(8, _v2)
483
486
  end
484
487
  def n_values
485
- _v1 = (@struct.to_ptr + 16)
486
- _v2 = _v1.get_uint32(0)
488
+ _v1 = @struct.to_ptr
489
+ _v2 = _v1.get_uint32(16)
487
490
  _v2
488
491
  end
489
492
  def n_values=(value)
490
- _v1 = (@struct.to_ptr + 16)
493
+ _v1 = @struct.to_ptr
491
494
  _v2 = value
492
- _v1.put_uint32(0, _v2)
495
+ _v1.put_uint32(16, _v2)
493
496
  end
494
497
  def values
495
- _v1 = (@struct.to_ptr + 24)
496
- _v2 = _v1.get_pointer(0)
498
+ _v1 = @struct.to_ptr
499
+ _v2 = _v1.get_pointer(24)
497
500
  _v3 = GObject::EnumValue.wrap(_v2)
498
501
  _v3
499
502
  end
500
503
  def values=(value)
501
- _v1 = (@struct.to_ptr + 24)
504
+ _v1 = @struct.to_ptr
502
505
  _v2 = GObject::EnumValue.copy_from(value)
503
- _v1.put_pointer(0, _v2)
506
+ _v1.put_pointer(24, _v2)
504
507
  end
505
508
  end
506
509
  class GObject::EnumValue < GirFFI::StructBase
507
510
 
508
511
  def value
509
- _v1 = (@struct.to_ptr + 0)
512
+ _v1 = @struct.to_ptr
510
513
  _v2 = _v1.get_int32(0)
511
514
  _v2
512
515
  end
513
516
  def value=(value)
514
- _v1 = (@struct.to_ptr + 0)
517
+ _v1 = @struct.to_ptr
515
518
  _v2 = value
516
519
  _v1.put_int32(0, _v2)
517
520
  end
518
521
  def value_name
519
- _v1 = (@struct.to_ptr + 8)
520
- _v2 = _v1.get_pointer(0)
522
+ _v1 = @struct.to_ptr
523
+ _v2 = _v1.get_pointer(8)
521
524
  _v3 = _v2.to_utf8
522
525
  _v3
523
526
  end
524
527
  def value_name=(value)
525
- _v1 = (@struct.to_ptr + 8)
528
+ _v1 = @struct.to_ptr
526
529
  _v2 = GirFFI::InPointer.from_utf8(value)
527
- _v1.put_pointer(0, _v2)
530
+ _v1.put_pointer(8, _v2)
528
531
  end
529
532
  def value_nick
530
- _v1 = (@struct.to_ptr + 16)
531
- _v2 = _v1.get_pointer(0)
533
+ _v1 = @struct.to_ptr
534
+ _v2 = _v1.get_pointer(16)
532
535
  _v3 = _v2.to_utf8
533
536
  _v3
534
537
  end
535
538
  def value_nick=(value)
536
- _v1 = (@struct.to_ptr + 16)
539
+ _v1 = @struct.to_ptr
537
540
  _v2 = GirFFI::InPointer.from_utf8(value)
538
- _v1.put_pointer(0, _v2)
541
+ _v1.put_pointer(16, _v2)
539
542
  end
540
543
  end
541
544
  class GObject::FlagsClass < GirFFI::StructBase
542
545
 
543
546
  def g_type_class
544
- _v1 = (@struct.to_ptr + 0)
547
+ _v1 = @struct.to_ptr
545
548
  _v2 = GObject::TypeClass.get_value_from_pointer(_v1, 0)
546
549
  _v3 = GObject::TypeClass.wrap(_v2)
547
550
  _v3
548
551
  end
549
552
  def g_type_class=(value)
550
- _v1 = (@struct.to_ptr + 0)
553
+ _v1 = @struct.to_ptr
551
554
  _v2 = GObject::TypeClass.copy_from(value)
552
555
  GObject::TypeClass.copy_value_to_pointer(_v2, _v1)
553
556
  end
554
557
  def mask
555
- _v1 = (@struct.to_ptr + 8)
556
- _v2 = _v1.get_uint32(0)
558
+ _v1 = @struct.to_ptr
559
+ _v2 = _v1.get_uint32(8)
557
560
  _v2
558
561
  end
559
562
  def mask=(value)
560
- _v1 = (@struct.to_ptr + 8)
563
+ _v1 = @struct.to_ptr
561
564
  _v2 = value
562
- _v1.put_uint32(0, _v2)
565
+ _v1.put_uint32(8, _v2)
563
566
  end
564
567
  def n_values
565
- _v1 = (@struct.to_ptr + 12)
566
- _v2 = _v1.get_uint32(0)
568
+ _v1 = @struct.to_ptr
569
+ _v2 = _v1.get_uint32(12)
567
570
  _v2
568
571
  end
569
572
  def n_values=(value)
570
- _v1 = (@struct.to_ptr + 12)
573
+ _v1 = @struct.to_ptr
571
574
  _v2 = value
572
- _v1.put_uint32(0, _v2)
575
+ _v1.put_uint32(12, _v2)
573
576
  end
574
577
  def values
575
- _v1 = (@struct.to_ptr + 16)
576
- _v2 = _v1.get_pointer(0)
578
+ _v1 = @struct.to_ptr
579
+ _v2 = _v1.get_pointer(16)
577
580
  _v3 = GObject::FlagsValue.wrap(_v2)
578
581
  _v3
579
582
  end
580
583
  def values=(value)
581
- _v1 = (@struct.to_ptr + 16)
584
+ _v1 = @struct.to_ptr
582
585
  _v2 = GObject::FlagsValue.copy_from(value)
583
- _v1.put_pointer(0, _v2)
586
+ _v1.put_pointer(16, _v2)
584
587
  end
585
588
  end
586
589
  class GObject::FlagsValue < GirFFI::StructBase
587
590
 
588
591
  def value
589
- _v1 = (@struct.to_ptr + 0)
592
+ _v1 = @struct.to_ptr
590
593
  _v2 = _v1.get_uint32(0)
591
594
  _v2
592
595
  end
593
596
  def value=(value)
594
- _v1 = (@struct.to_ptr + 0)
597
+ _v1 = @struct.to_ptr
595
598
  _v2 = value
596
599
  _v1.put_uint32(0, _v2)
597
600
  end
598
601
  def value_name
599
- _v1 = (@struct.to_ptr + 8)
600
- _v2 = _v1.get_pointer(0)
602
+ _v1 = @struct.to_ptr
603
+ _v2 = _v1.get_pointer(8)
601
604
  _v3 = _v2.to_utf8
602
605
  _v3
603
606
  end
604
607
  def value_name=(value)
605
- _v1 = (@struct.to_ptr + 8)
608
+ _v1 = @struct.to_ptr
606
609
  _v2 = GirFFI::InPointer.from_utf8(value)
607
- _v1.put_pointer(0, _v2)
610
+ _v1.put_pointer(8, _v2)
608
611
  end
609
612
  def value_nick
610
- _v1 = (@struct.to_ptr + 16)
611
- _v2 = _v1.get_pointer(0)
613
+ _v1 = @struct.to_ptr
614
+ _v2 = _v1.get_pointer(16)
612
615
  _v3 = _v2.to_utf8
613
616
  _v3
614
617
  end
615
618
  def value_nick=(value)
616
- _v1 = (@struct.to_ptr + 16)
619
+ _v1 = @struct.to_ptr
617
620
  _v2 = GirFFI::InPointer.from_utf8(value)
618
- _v1.put_pointer(0, _v2)
621
+ _v1.put_pointer(16, _v2)
619
622
  end
620
623
  end
621
624
  class GObject::InitiallyUnowned < GObject::Object
622
625
 
623
- def g_type_instance
624
- _v1 = (@struct.to_ptr + 0)
625
- _v2 = GObject::TypeInstance.get_value_from_pointer(_v1, 0)
626
- _v3 = GObject::TypeInstance.wrap(_v2)
627
- _v3
628
- end
629
- def ref_count
630
- _v1 = (@struct.to_ptr + 8)
631
- _v2 = _v1.get_uint32(0)
632
- _v2
633
- end
634
626
  # Initializing method used in constructors. For InitiallyUnowned and
635
627
  # descendants, this needs to sink the object's floating reference.
636
628
  def store_pointer(ptr)
@@ -641,66 +633,66 @@ module GObject
641
633
  class GObject::InitiallyUnownedClass < GObject::ObjectClass
642
634
 
643
635
  def construct_properties
644
- _v1 = (@struct.to_ptr + 8)
645
- _v2 = _v1.get_pointer(0)
636
+ _v1 = @struct.to_ptr
637
+ _v2 = _v1.get_pointer(8)
646
638
  _v3 = GLib::SList.wrap([:pointer, :void], _v2)
647
639
  _v3
648
640
  end
649
641
  def constructed
650
- _v1 = (@struct.to_ptr + 72)
651
- _v2 = GObject::Constructed.get_value_from_pointer(_v1, 0)
642
+ _v1 = @struct.to_ptr
643
+ _v2 = GObject::Constructed.get_value_from_pointer(_v1, 72)
652
644
  _v2
653
645
  end
654
646
  def constructor
655
- _v1 = (@struct.to_ptr + 16)
656
- _v2 = _v1.get_pointer(0)
647
+ _v1 = @struct.to_ptr
648
+ _v2 = _v1.get_pointer(16)
657
649
  _v2
658
650
  end
659
651
  def dispatch_properties_changed
660
- _v1 = (@struct.to_ptr + 56)
661
- _v2 = GObject::Dispatch_properties_changed.get_value_from_pointer(_v1, 0)
652
+ _v1 = @struct.to_ptr
653
+ _v2 = GObject::Dispatch_properties_changed.get_value_from_pointer(_v1, 56)
662
654
  _v2
663
655
  end
664
656
  def dispose
665
- _v1 = (@struct.to_ptr + 40)
666
- _v2 = GObject::Dispose.get_value_from_pointer(_v1, 0)
657
+ _v1 = @struct.to_ptr
658
+ _v2 = GObject::Dispose.get_value_from_pointer(_v1, 40)
667
659
  _v2
668
660
  end
669
661
  def finalize
670
- _v1 = (@struct.to_ptr + 48)
671
- _v2 = GObject::Finalize.get_value_from_pointer(_v1, 0)
662
+ _v1 = @struct.to_ptr
663
+ _v2 = GObject::Finalize.get_value_from_pointer(_v1, 48)
672
664
  _v2
673
665
  end
674
666
  def flags
675
- _v1 = (@struct.to_ptr + 80)
676
- _v2 = _v1.get_uint64(0)
667
+ _v1 = @struct.to_ptr
668
+ _v2 = _v1.get_uint64(80)
677
669
  _v2
678
670
  end
679
671
  def g_type_class
680
- _v1 = (@struct.to_ptr + 0)
672
+ _v1 = @struct.to_ptr
681
673
  _v2 = GObject::TypeClass.get_value_from_pointer(_v1, 0)
682
674
  _v3 = GObject::TypeClass.wrap(_v2)
683
675
  _v3
684
676
  end
685
677
  def get_property
686
- _v1 = (@struct.to_ptr + 32)
687
- _v2 = GObject::Get_property.get_value_from_pointer(_v1, 0)
678
+ _v1 = @struct.to_ptr
679
+ _v2 = GObject::Get_property.get_value_from_pointer(_v1, 32)
688
680
  _v2
689
681
  end
690
682
  def notify
691
- _v1 = (@struct.to_ptr + 64)
692
- _v2 = GObject::Notify.get_value_from_pointer(_v1, 0)
683
+ _v1 = @struct.to_ptr
684
+ _v2 = GObject::Notify.get_value_from_pointer(_v1, 64)
693
685
  _v2
694
686
  end
695
687
  def pdummy
696
- _v1 = (@struct.to_ptr + 88)
697
- _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 0)
688
+ _v1 = @struct.to_ptr
689
+ _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 88)
698
690
  _v3 = GirFFI::SizedArray.wrap([:pointer, :void], 6, _v2)
699
691
  _v3
700
692
  end
701
693
  def set_property
702
- _v1 = (@struct.to_ptr + 24)
703
- _v2 = GObject::Set_property.get_value_from_pointer(_v1, 0)
694
+ _v1 = @struct.to_ptr
695
+ _v2 = GObject::Set_property.get_value_from_pointer(_v1, 24)
704
696
  _v2
705
697
  end
706
698
  end
@@ -709,32 +701,32 @@ module GObject
709
701
  class GObject::InterfaceInfo < GirFFI::StructBase
710
702
 
711
703
  def interface_data
712
- _v1 = (@struct.to_ptr + 16)
713
- _v2 = _v1.get_pointer(0)
704
+ _v1 = @struct.to_ptr
705
+ _v2 = _v1.get_pointer(16)
714
706
  _v2
715
707
  end
716
708
  def interface_data=(value)
717
- _v1 = (@struct.to_ptr + 16)
709
+ _v1 = @struct.to_ptr
718
710
  _v2 = value
719
- _v1.put_pointer(0, _v2)
711
+ _v1.put_pointer(16, _v2)
720
712
  end
721
713
  def interface_finalize
722
- _v1 = (@struct.to_ptr + 8)
723
- _v2 = GObject::InterfaceFinalizeFunc.get_value_from_pointer(_v1, 0)
714
+ _v1 = @struct.to_ptr
715
+ _v2 = GObject::InterfaceFinalizeFunc.get_value_from_pointer(_v1, 8)
724
716
  _v2
725
717
  end
726
718
  def interface_finalize=(value)
727
- _v1 = (@struct.to_ptr + 8)
719
+ _v1 = @struct.to_ptr
728
720
  _v2 = GObject::InterfaceFinalizeFunc.from(value)
729
- GObject::InterfaceFinalizeFunc.copy_value_to_pointer(_v2, _v1)
721
+ GObject::InterfaceFinalizeFunc.copy_value_to_pointer(_v2, _v1, 8)
730
722
  end
731
723
  def interface_init
732
- _v1 = (@struct.to_ptr + 0)
724
+ _v1 = @struct.to_ptr
733
725
  _v2 = GObject::InterfaceInitFunc.get_value_from_pointer(_v1, 0)
734
726
  _v2
735
727
  end
736
728
  def interface_init=(value)
737
- _v1 = (@struct.to_ptr + 0)
729
+ _v1 = @struct.to_ptr
738
730
  _v2 = GObject::InterfaceInitFunc.from(value)
739
731
  GObject::InterfaceInitFunc.copy_value_to_pointer(_v2, _v1)
740
732
  end
@@ -770,7 +762,7 @@ module GObject
770
762
  def self.make_finalizer(ptr)
771
763
  proc do
772
764
  rc = GObject::Object::Struct.new(ptr)[:ref_count]
773
- if rc.zero? then
765
+ if (rc == 0) then
774
766
  warn("not unreffing #{name}:#{ptr} (#{rc})")
775
767
  else
776
768
  GObject::Lib.g_object_unref(ptr)
@@ -782,6 +774,11 @@ module GObject
782
774
  obj.__send__(:initialize, *args, &block)
783
775
  obj
784
776
  end
777
+ def self.new_with_properties(*args, &block)
778
+ obj = allocate
779
+ obj.__send__(:initialize_with_properties, *args, &block)
780
+ obj
781
+ end
785
782
  def self.newv(*args, &block)
786
783
  raise(NoMethodError) unless (self == GObject::Object)
787
784
  obj = allocate
@@ -814,26 +811,22 @@ module GObject
814
811
  def freeze_notify
815
812
  GObject::Lib.g_object_freeze_notify(self)
816
813
  end
817
- def g_type_instance
818
- _v1 = (@struct.to_ptr + 0)
819
- _v2 = GObject::TypeInstance.get_value_from_pointer(_v1, 0)
820
- _v3 = GObject::TypeInstance.wrap(_v2)
821
- _v3
822
- end
823
814
  def get_data(key)
824
815
  _v1 = GirFFI::InPointer.from_utf8(key)
825
816
  _v2 = GObject::Lib.g_object_get_data(self, _v1)
826
817
  return _v2
827
818
  end
819
+ # @deprecated
828
820
  def get_property_extended(property_name)
829
- value = get_property(property_name)
830
- type_info = get_property_type(property_name)
831
- property_value_post_conversion(value, type_info)
821
+ get_property(property_name)
832
822
  end
833
823
  def get_property_with_override(property_name)
834
824
  gvalue = gvalue_for_property(property_name)
835
825
  get_property_without_override(property_name, gvalue)
836
- gvalue.get_value
826
+ value = gvalue.get_value
827
+ type_info = get_property_type(property_name)
828
+ value = property_value_post_conversion(value, type_info) if type_info
829
+ value
837
830
  end
838
831
  def get_qdata(quark)
839
832
  _v1 = quark
@@ -847,6 +840,16 @@ module GObject
847
840
  _v3 = GirFFI::SizedArray.from(GObject::Value, -1, values)
848
841
  GObject::Lib.g_object_getv(self, _v1, _v2, _v3)
849
842
  end
843
+ # Starting with GLib 2.54.0, use g_object_new_with_properties, which
844
+ # takes an array of names and an array of values.
845
+ def initialize_with_properties(properties = {})
846
+ names, gvalues = names_and_gvalues_for_properties(properties)
847
+ n_properties = names.length
848
+ names_arr = GirFFI::SizedArray.from(:utf8, -1, names)
849
+ gvalues_arr = GirFFI::SizedArray.from(GObject::Value, -1, gvalues)
850
+ ptr = GObject::Lib.g_object_new_with_properties(self.class.gtype, n_properties, names_arr, gvalues_arr)
851
+ store_pointer(ptr)
852
+ end
850
853
  def initializev(object_type, parameters)
851
854
  _v1 = object_type
852
855
  n_parameters = parameters.nil? ? (0) : (parameters.length)
@@ -859,16 +862,6 @@ module GObject
859
862
  _v1 = GObject::Lib.g_object_is_floating(self)
860
863
  return _v1
861
864
  end
862
- # TODO: Generate accessor methods from GIR at class definition time
863
- def method_missing(method, *args)
864
- getter_name = "get_#{method}"
865
- return send(getter_name, *args) if respond_to?(getter_name)
866
- if method.to_s =~ /(.*)=$/ then
867
- setter_name = "set_#{Regexp.last_match[1]}"
868
- return send(setter_name, *args) if respond_to?(setter_name)
869
- end
870
- super
871
- end
872
865
  def notify(property_name)
873
866
  _v1 = GirFFI::InPointer.from_utf8(property_name)
874
867
  GObject::Lib.g_object_notify(self, _v1)
@@ -881,11 +874,6 @@ module GObject
881
874
  Lib.g_object_ref(self)
882
875
  self
883
876
  end
884
- def ref_count
885
- _v1 = (@struct.to_ptr + 8)
886
- _v2 = _v1.get_uint32(0)
887
- _v2
888
- end
889
877
  def ref_sink
890
878
  _v1 = GObject::Lib.g_object_ref_sink(self)
891
879
  _v2 = GObject::Object.wrap(_v1).tap { |it| it and it.ref }
@@ -899,12 +887,13 @@ module GObject
899
887
  _v2 = data
900
888
  GObject::Lib.g_object_set_data(self, _v1, _v2)
901
889
  end
890
+ # @deprecated
902
891
  def set_property_extended(property_name, value)
903
- type_info = get_property_type(property_name)
904
- adjusted_value = property_value_pre_conversion(value, type_info)
905
- set_property(property_name, adjusted_value)
892
+ set_property(property_name, value)
906
893
  end
907
894
  def set_property_with_override(property_name, value)
895
+ type_info = get_property_type(property_name)
896
+ value = property_value_pre_conversion(value, type_info) if type_info
908
897
  gvalue = gvalue_for_property(property_name)
909
898
  gvalue.set_value(value)
910
899
  set_property_without_override(property_name, gvalue)
@@ -939,43 +928,46 @@ module GObject
939
928
  _v1 = GObject::Closure.from(closure)
940
929
  GObject::Lib.g_object_watch_closure(self, _v1)
941
930
  end
931
+ alias_method 'data', 'get_data'
942
932
  alias_method 'floating?', 'is_floating'
943
933
  alias_method 'get_property', 'get_property_with_override'
944
934
  alias_method 'get_property_without_override', 'get_property'
935
+ alias_method 'property', 'get_property'
936
+ alias_method 'qdata', 'get_qdata'
945
937
  alias_method 'set_property', 'set_property_with_override'
946
938
  alias_method 'set_property_without_override', 'set_property'
947
939
  end
948
940
  class GObject::ObjectClass < GObject::TypeClass
949
941
 
950
942
  def construct_properties
951
- _v1 = (@struct.to_ptr + 8)
952
- _v2 = _v1.get_pointer(0)
943
+ _v1 = @struct.to_ptr
944
+ _v2 = _v1.get_pointer(8)
953
945
  _v3 = GLib::SList.wrap([:pointer, :void], _v2)
954
946
  _v3
955
947
  end
956
948
  def constructed
957
- _v1 = (@struct.to_ptr + 72)
958
- _v2 = GObject::Constructed.get_value_from_pointer(_v1, 0)
949
+ _v1 = @struct.to_ptr
950
+ _v2 = GObject::Constructed.get_value_from_pointer(_v1, 72)
959
951
  _v2
960
952
  end
961
953
  def constructor
962
- _v1 = (@struct.to_ptr + 16)
963
- _v2 = _v1.get_pointer(0)
954
+ _v1 = @struct.to_ptr
955
+ _v2 = _v1.get_pointer(16)
964
956
  _v2
965
957
  end
966
958
  def dispatch_properties_changed
967
- _v1 = (@struct.to_ptr + 56)
968
- _v2 = GObject::Dispatch_properties_changed.get_value_from_pointer(_v1, 0)
959
+ _v1 = @struct.to_ptr
960
+ _v2 = GObject::Dispatch_properties_changed.get_value_from_pointer(_v1, 56)
969
961
  _v2
970
962
  end
971
963
  def dispose
972
- _v1 = (@struct.to_ptr + 40)
973
- _v2 = GObject::Dispose.get_value_from_pointer(_v1, 0)
964
+ _v1 = @struct.to_ptr
965
+ _v2 = GObject::Dispose.get_value_from_pointer(_v1, 40)
974
966
  _v2
975
967
  end
976
968
  def finalize
977
- _v1 = (@struct.to_ptr + 48)
978
- _v2 = GObject::Finalize.get_value_from_pointer(_v1, 0)
969
+ _v1 = @struct.to_ptr
970
+ _v2 = GObject::Finalize.get_value_from_pointer(_v1, 48)
979
971
  _v2
980
972
  end
981
973
  def find_property(property_name)
@@ -985,23 +977,23 @@ module GObject
985
977
  return _v3
986
978
  end
987
979
  def flags
988
- _v1 = (@struct.to_ptr + 80)
989
- _v2 = _v1.get_uint64(0)
980
+ _v1 = @struct.to_ptr
981
+ _v2 = _v1.get_uint64(80)
990
982
  _v2
991
983
  end
992
984
  def g_type_class
993
- _v1 = (@struct.to_ptr + 0)
985
+ _v1 = @struct.to_ptr
994
986
  _v2 = GObject::TypeClass.get_value_from_pointer(_v1, 0)
995
987
  _v3 = GObject::TypeClass.wrap(_v2)
996
988
  _v3
997
989
  end
998
990
  def get_property
999
- _v1 = (@struct.to_ptr + 32)
1000
- _v2 = GObject::Get_property.get_value_from_pointer(_v1, 0)
991
+ _v1 = @struct.to_ptr
992
+ _v2 = GObject::Get_property.get_value_from_pointer(_v1, 32)
1001
993
  _v2
1002
994
  end
1003
995
  def get_property=(callback)
1004
- @struct[:get_property] = GObject::ObjectGetPropertyFunc.from(callback)
996
+ struct[:get_property] = GObject::ObjectGetPropertyFunc.from(callback)
1005
997
  end
1006
998
  def gtype
1007
999
  to_ptr.get_gtype(0)
@@ -1025,8 +1017,8 @@ module GObject
1025
1017
  return _v4
1026
1018
  end
1027
1019
  def notify
1028
- _v1 = (@struct.to_ptr + 64)
1029
- _v2 = GObject::Notify.get_value_from_pointer(_v1, 0)
1020
+ _v1 = @struct.to_ptr
1021
+ _v2 = GObject::Notify.get_value_from_pointer(_v1, 64)
1030
1022
  _v2
1031
1023
  end
1032
1024
  def override_property(property_id, name)
@@ -1035,43 +1027,43 @@ module GObject
1035
1027
  GObject::Lib.g_object_class_override_property(self, _v1, _v2)
1036
1028
  end
1037
1029
  def pdummy
1038
- _v1 = (@struct.to_ptr + 88)
1039
- _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 0)
1030
+ _v1 = @struct.to_ptr
1031
+ _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 88)
1040
1032
  _v3 = GirFFI::SizedArray.wrap([:pointer, :void], 6, _v2)
1041
1033
  _v3
1042
1034
  end
1043
1035
  def set_property
1044
- _v1 = (@struct.to_ptr + 24)
1045
- _v2 = GObject::Set_property.get_value_from_pointer(_v1, 0)
1036
+ _v1 = @struct.to_ptr
1037
+ _v2 = GObject::Set_property.get_value_from_pointer(_v1, 24)
1046
1038
  _v2
1047
1039
  end
1048
1040
  def set_property=(callback)
1049
- @struct[:set_property] = GObject::ObjectSetPropertyFunc.from(callback)
1041
+ struct[:set_property] = GObject::ObjectSetPropertyFunc.from(callback)
1050
1042
  end
1051
1043
  end
1052
1044
  class GObject::ObjectConstructParam < GirFFI::StructBase
1053
1045
 
1054
1046
  def pspec
1055
- _v1 = (@struct.to_ptr + 0)
1047
+ _v1 = @struct.to_ptr
1056
1048
  _v2 = _v1.get_pointer(0)
1057
1049
  _v3 = GObject::ParamSpec.wrap(_v2)
1058
1050
  _v3
1059
1051
  end
1060
1052
  def pspec=(value)
1061
- _v1 = (@struct.to_ptr + 0)
1053
+ _v1 = @struct.to_ptr
1062
1054
  _v2 = GObject::ParamSpec.from((value and value.ref))
1063
1055
  _v1.put_pointer(0, _v2)
1064
1056
  end
1065
1057
  def value
1066
- _v1 = (@struct.to_ptr + 8)
1067
- _v2 = _v1.get_pointer(0)
1058
+ _v1 = @struct.to_ptr
1059
+ _v2 = _v1.get_pointer(8)
1068
1060
  _v3 = GObject::Value.wrap(_v2)
1069
1061
  _v3
1070
1062
  end
1071
1063
  def value=(value)
1072
- _v1 = (@struct.to_ptr + 8)
1064
+ _v1 = @struct.to_ptr
1073
1065
  _v2 = GObject::Value.copy_from(value)
1074
- _v1.put_pointer(0, _v2)
1066
+ _v1.put_pointer(8, _v2)
1075
1067
  end
1076
1068
  end
1077
1069
  # XXX: Don't know how to print callback
@@ -1083,31 +1075,11 @@ module GObject
1083
1075
  # XXX: Don't know how to print flags
1084
1076
  class GObject::ParamSpec < GirFFI::ObjectBase
1085
1077
 
1086
- def _blurb
1087
- _v1 = (@struct.to_ptr + 48)
1088
- _v2 = _v1.get_pointer(0)
1089
- _v3 = _v2.to_utf8
1090
- _v3
1091
- end
1092
- def _nick
1093
- _v1 = (@struct.to_ptr + 40)
1094
- _v2 = _v1.get_pointer(0)
1095
- _v3 = _v2.to_utf8
1096
- _v3
1097
- end
1098
1078
  def accessor_name
1099
1079
  get_name.tr("-", "_")
1100
1080
  end
1101
1081
  def flags
1102
- _v1 = (@struct.to_ptr + 16)
1103
- _v2 = GObject::ParamFlags.get_value_from_pointer(_v1, 0)
1104
- _v2
1105
- end
1106
- def g_type_instance
1107
- _v1 = (@struct.to_ptr + 0)
1108
- _v2 = GObject::TypeInstance.get_value_from_pointer(_v1, 0)
1109
- _v3 = GObject::TypeInstance.wrap(_v2)
1110
- _v3
1082
+ GObject::ParamFlags.get_value_from_pointer(to_ptr, FLAGS_OFFSET)
1111
1083
  end
1112
1084
  def get_blurb
1113
1085
  _v1 = GObject::Lib.g_param_spec_get_blurb(self)
@@ -1143,25 +1115,10 @@ module GObject
1143
1115
  _v2 = GObject::ParamSpec.wrap(_v1).tap { |it| it and it.ref }
1144
1116
  return _v2
1145
1117
  end
1146
- def owner_type
1147
- _v1 = (@struct.to_ptr + 32)
1148
- _v2 = _v1.get_uint64(0)
1149
- _v2
1150
- end
1151
- def param_id
1152
- _v1 = (@struct.to_ptr + 68)
1153
- _v2 = _v1.get_uint32(0)
1154
- _v2
1155
- end
1156
1118
  def ref
1157
1119
  Lib.g_param_spec_ref(self)
1158
1120
  self
1159
1121
  end
1160
- def ref_count
1161
- _v1 = (@struct.to_ptr + 64)
1162
- _v2 = _v1.get_uint32(0)
1163
- _v2
1164
- end
1165
1122
  def set_qdata(quark, data = nil)
1166
1123
  _v1 = quark
1167
1124
  _v2 = data
@@ -1176,18 +1133,19 @@ module GObject
1176
1133
  return _v2
1177
1134
  end
1178
1135
  def value_type
1179
- _v1 = (@struct.to_ptr + 24)
1180
- _v2 = _v1.get_uint64(0)
1181
- _v2
1136
+ to_ptr.get_gtype(VALUE_TYPE_OFFSET)
1182
1137
  end
1138
+ alias_method 'blurb', 'get_blurb'
1139
+ alias_method 'default_value', 'get_default_value'
1140
+ alias_method 'name', 'get_name'
1141
+ alias_method 'name_quark', 'get_name_quark'
1142
+ alias_method 'nick', 'get_nick'
1143
+ alias_method 'qdata', 'get_qdata'
1144
+ alias_method 'redirect_target', 'get_redirect_target'
1183
1145
  end
1184
1146
  class GObject::ParamSpecBoolean < GObject::ParamSpec
1185
1147
 
1186
- def default_value
1187
- _v1 = (@struct.to_ptr + 72)
1188
- _v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 0)
1189
- _v2
1190
- end
1148
+
1191
1149
  end
1192
1150
  class GObject::ParamSpecBoxed < GObject::ParamSpec
1193
1151
 
@@ -1195,197 +1153,79 @@ module GObject
1195
1153
  end
1196
1154
  class GObject::ParamSpecChar < GObject::ParamSpec
1197
1155
 
1198
- def default_value
1199
- _v1 = (@struct.to_ptr + 74)
1200
- _v2 = _v1.get_int8(0)
1201
- _v2
1202
- end
1203
- def maximum
1204
- _v1 = (@struct.to_ptr + 73)
1205
- _v2 = _v1.get_int8(0)
1206
- _v2
1207
- end
1208
- def minimum
1209
- _v1 = (@struct.to_ptr + 72)
1210
- _v2 = _v1.get_int8(0)
1211
- _v2
1212
- end
1156
+
1213
1157
  end
1214
1158
  class GObject::ParamSpecClass < GObject::TypeClass
1215
1159
 
1216
1160
  def dummy
1217
- _v1 = (@struct.to_ptr + 48)
1218
- _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 0)
1161
+ _v1 = @struct.to_ptr
1162
+ _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 48)
1219
1163
  _v3 = GirFFI::SizedArray.wrap([:pointer, :void], 4, _v2)
1220
1164
  _v3
1221
1165
  end
1222
1166
  def finalize
1223
- _v1 = (@struct.to_ptr + 16)
1224
- _v2 = GObject::Finalize.get_value_from_pointer(_v1, 0)
1167
+ _v1 = @struct.to_ptr
1168
+ _v2 = GObject::Finalize.get_value_from_pointer(_v1, 16)
1225
1169
  _v2
1226
1170
  end
1227
1171
  def g_type_class
1228
- _v1 = (@struct.to_ptr + 0)
1172
+ _v1 = @struct.to_ptr
1229
1173
  _v2 = GObject::TypeClass.get_value_from_pointer(_v1, 0)
1230
1174
  _v3 = GObject::TypeClass.wrap(_v2)
1231
1175
  _v3
1232
1176
  end
1233
1177
  def value_set_default
1234
- _v1 = (@struct.to_ptr + 24)
1235
- _v2 = GObject::Value_set_default.get_value_from_pointer(_v1, 0)
1178
+ _v1 = @struct.to_ptr
1179
+ _v2 = GObject::Value_set_default.get_value_from_pointer(_v1, 24)
1236
1180
  _v2
1237
1181
  end
1238
1182
  def value_type
1239
- _v1 = (@struct.to_ptr + 8)
1240
- _v2 = _v1.get_uint64(0)
1183
+ _v1 = @struct.to_ptr
1184
+ _v2 = _v1.get_uint64(8)
1241
1185
  _v2
1242
1186
  end
1243
1187
  def value_validate
1244
- _v1 = (@struct.to_ptr + 32)
1245
- _v2 = GObject::Value_validate.get_value_from_pointer(_v1, 0)
1188
+ _v1 = @struct.to_ptr
1189
+ _v2 = GObject::Value_validate.get_value_from_pointer(_v1, 32)
1246
1190
  _v2
1247
1191
  end
1248
1192
  def values_cmp
1249
- _v1 = (@struct.to_ptr + 40)
1250
- _v2 = GObject::Values_cmp.get_value_from_pointer(_v1, 0)
1193
+ _v1 = @struct.to_ptr
1194
+ _v2 = GObject::Values_cmp.get_value_from_pointer(_v1, 40)
1251
1195
  _v2
1252
1196
  end
1253
1197
  end
1254
1198
  class GObject::ParamSpecDouble < GObject::ParamSpec
1255
1199
 
1256
- def default_value
1257
- _v1 = (@struct.to_ptr + 88)
1258
- _v2 = _v1.get_double(0)
1259
- _v2
1260
- end
1261
- def epsilon
1262
- _v1 = (@struct.to_ptr + 96)
1263
- _v2 = _v1.get_double(0)
1264
- _v2
1265
- end
1266
- def maximum
1267
- _v1 = (@struct.to_ptr + 80)
1268
- _v2 = _v1.get_double(0)
1269
- _v2
1270
- end
1271
- def minimum
1272
- _v1 = (@struct.to_ptr + 72)
1273
- _v2 = _v1.get_double(0)
1274
- _v2
1275
- end
1200
+
1276
1201
  end
1277
1202
  class GObject::ParamSpecEnum < GObject::ParamSpec
1278
1203
 
1279
- def default_value
1280
- _v1 = (@struct.to_ptr + 80)
1281
- _v2 = _v1.get_int32(0)
1282
- _v2
1283
- end
1284
- def enum_class
1285
- _v1 = (@struct.to_ptr + 72)
1286
- _v2 = _v1.get_pointer(0)
1287
- _v3 = GObject::EnumClass.wrap(_v2)
1288
- _v3
1289
- end
1204
+
1290
1205
  end
1291
1206
  class GObject::ParamSpecFlags < GObject::ParamSpec
1292
1207
 
1293
- def default_value
1294
- _v1 = (@struct.to_ptr + 80)
1295
- _v2 = _v1.get_uint32(0)
1296
- _v2
1297
- end
1298
- def flags_class
1299
- _v1 = (@struct.to_ptr + 72)
1300
- _v2 = _v1.get_pointer(0)
1301
- _v3 = GObject::FlagsClass.wrap(_v2)
1302
- _v3
1303
- end
1208
+
1304
1209
  end
1305
1210
  class GObject::ParamSpecFloat < GObject::ParamSpec
1306
1211
 
1307
- def default_value
1308
- _v1 = (@struct.to_ptr + 80)
1309
- _v2 = _v1.get_float(0)
1310
- _v2
1311
- end
1312
- def epsilon
1313
- _v1 = (@struct.to_ptr + 84)
1314
- _v2 = _v1.get_float(0)
1315
- _v2
1316
- end
1317
- def maximum
1318
- _v1 = (@struct.to_ptr + 76)
1319
- _v2 = _v1.get_float(0)
1320
- _v2
1321
- end
1322
- def minimum
1323
- _v1 = (@struct.to_ptr + 72)
1324
- _v2 = _v1.get_float(0)
1325
- _v2
1326
- end
1212
+
1327
1213
  end
1328
1214
  class GObject::ParamSpecGType < GObject::ParamSpec
1329
1215
 
1330
- def is_a_type
1331
- _v1 = (@struct.to_ptr + 72)
1332
- _v2 = _v1.get_uint64(0)
1333
- _v2
1334
- end
1216
+
1335
1217
  end
1336
1218
  class GObject::ParamSpecInt < GObject::ParamSpec
1337
1219
 
1338
- def default_value
1339
- _v1 = (@struct.to_ptr + 80)
1340
- _v2 = _v1.get_int32(0)
1341
- _v2
1342
- end
1343
- def maximum
1344
- _v1 = (@struct.to_ptr + 76)
1345
- _v2 = _v1.get_int32(0)
1346
- _v2
1347
- end
1348
- def minimum
1349
- _v1 = (@struct.to_ptr + 72)
1350
- _v2 = _v1.get_int32(0)
1351
- _v2
1352
- end
1220
+
1353
1221
  end
1354
1222
  class GObject::ParamSpecInt64 < GObject::ParamSpec
1355
1223
 
1356
- def default_value
1357
- _v1 = (@struct.to_ptr + 88)
1358
- _v2 = _v1.get_int64(0)
1359
- _v2
1360
- end
1361
- def maximum
1362
- _v1 = (@struct.to_ptr + 80)
1363
- _v2 = _v1.get_int64(0)
1364
- _v2
1365
- end
1366
- def minimum
1367
- _v1 = (@struct.to_ptr + 72)
1368
- _v2 = _v1.get_int64(0)
1369
- _v2
1370
- end
1224
+
1371
1225
  end
1372
1226
  class GObject::ParamSpecLong < GObject::ParamSpec
1373
1227
 
1374
- def default_value
1375
- _v1 = (@struct.to_ptr + 88)
1376
- _v2 = _v1.get_int64(0)
1377
- _v2
1378
- end
1379
- def maximum
1380
- _v1 = (@struct.to_ptr + 80)
1381
- _v2 = _v1.get_int64(0)
1382
- _v2
1383
- end
1384
- def minimum
1385
- _v1 = (@struct.to_ptr + 72)
1386
- _v2 = _v1.get_int64(0)
1387
- _v2
1388
- end
1228
+
1389
1229
  end
1390
1230
  class GObject::ParamSpecObject < GObject::ParamSpec
1391
1231
 
@@ -1393,12 +1233,7 @@ module GObject
1393
1233
  end
1394
1234
  class GObject::ParamSpecOverride < GObject::ParamSpec
1395
1235
 
1396
- def overridden
1397
- _v1 = (@struct.to_ptr + 72)
1398
- _v2 = _v1.get_pointer(0)
1399
- _v3 = GObject::ParamSpec.wrap(_v2)
1400
- _v3
1401
- end
1236
+
1402
1237
  end
1403
1238
  class GObject::ParamSpecParam < GObject::ParamSpec
1404
1239
 
@@ -1449,224 +1284,117 @@ module GObject
1449
1284
  end
1450
1285
  class GObject::ParamSpecString < GObject::ParamSpec
1451
1286
 
1452
- def cset_first
1453
- _v1 = (@struct.to_ptr + 80)
1454
- _v2 = _v1.get_pointer(0)
1455
- _v3 = _v2.to_utf8
1456
- _v3
1457
- end
1458
- def cset_nth
1459
- _v1 = (@struct.to_ptr + 88)
1460
- _v2 = _v1.get_pointer(0)
1461
- _v3 = _v2.to_utf8
1462
- _v3
1463
- end
1464
- def default_value
1465
- _v1 = (@struct.to_ptr + 72)
1466
- _v2 = _v1.get_pointer(0)
1467
- _v3 = _v2.to_utf8
1468
- _v3
1469
- end
1470
- def ensure_non_null
1471
- _v1 = (@struct.to_ptr + 104)
1472
- _v2 = _v1.get_uint32(0)
1473
- _v2
1474
- end
1475
- def null_fold_if_empty
1476
- _v1 = (@struct.to_ptr + 100)
1477
- _v2 = _v1.get_uint32(0)
1478
- _v2
1479
- end
1480
- def substitutor
1481
- _v1 = (@struct.to_ptr + 96)
1482
- _v2 = _v1.get_int8(0)
1483
- _v2
1484
- end
1287
+
1485
1288
  end
1486
1289
  class GObject::ParamSpecTypeInfo < GirFFI::StructBase
1487
1290
 
1488
1291
  def finalize
1489
- _v1 = (@struct.to_ptr + 24)
1490
- _v2 = GObject::Finalize.get_value_from_pointer(_v1, 0)
1292
+ _v1 = @struct.to_ptr
1293
+ _v2 = GObject::Finalize.get_value_from_pointer(_v1, 24)
1491
1294
  _v2
1492
1295
  end
1493
1296
  def instance_init
1494
- _v1 = (@struct.to_ptr + 8)
1495
- _v2 = GObject::Instance_init.get_value_from_pointer(_v1, 0)
1297
+ _v1 = @struct.to_ptr
1298
+ _v2 = GObject::Instance_init.get_value_from_pointer(_v1, 8)
1496
1299
  _v2
1497
1300
  end
1498
1301
  def instance_size
1499
- _v1 = (@struct.to_ptr + 0)
1302
+ _v1 = @struct.to_ptr
1500
1303
  _v2 = _v1.get_uint16(0)
1501
1304
  _v2
1502
1305
  end
1503
1306
  def instance_size=(value)
1504
- _v1 = (@struct.to_ptr + 0)
1307
+ _v1 = @struct.to_ptr
1505
1308
  _v2 = value
1506
1309
  _v1.put_uint16(0, _v2)
1507
1310
  end
1508
1311
  def n_preallocs
1509
- _v1 = (@struct.to_ptr + 2)
1510
- _v2 = _v1.get_uint16(0)
1312
+ _v1 = @struct.to_ptr
1313
+ _v2 = _v1.get_uint16(2)
1511
1314
  _v2
1512
1315
  end
1513
1316
  def n_preallocs=(value)
1514
- _v1 = (@struct.to_ptr + 2)
1317
+ _v1 = @struct.to_ptr
1515
1318
  _v2 = value
1516
- _v1.put_uint16(0, _v2)
1319
+ _v1.put_uint16(2, _v2)
1517
1320
  end
1518
1321
  def value_set_default
1519
- _v1 = (@struct.to_ptr + 32)
1520
- _v2 = GObject::Value_set_default.get_value_from_pointer(_v1, 0)
1322
+ _v1 = @struct.to_ptr
1323
+ _v2 = GObject::Value_set_default.get_value_from_pointer(_v1, 32)
1521
1324
  _v2
1522
1325
  end
1523
1326
  def value_type
1524
- _v1 = (@struct.to_ptr + 16)
1525
- _v2 = _v1.get_uint64(0)
1327
+ _v1 = @struct.to_ptr
1328
+ _v2 = _v1.get_uint64(16)
1526
1329
  _v2
1527
1330
  end
1528
1331
  def value_type=(value)
1529
- _v1 = (@struct.to_ptr + 16)
1332
+ _v1 = @struct.to_ptr
1530
1333
  _v2 = value
1531
- _v1.put_uint64(0, _v2)
1334
+ _v1.put_uint64(16, _v2)
1532
1335
  end
1533
1336
  def value_validate
1534
- _v1 = (@struct.to_ptr + 40)
1535
- _v2 = GObject::Value_validate.get_value_from_pointer(_v1, 0)
1337
+ _v1 = @struct.to_ptr
1338
+ _v2 = GObject::Value_validate.get_value_from_pointer(_v1, 40)
1536
1339
  _v2
1537
1340
  end
1538
1341
  def values_cmp
1539
- _v1 = (@struct.to_ptr + 48)
1540
- _v2 = GObject::Values_cmp.get_value_from_pointer(_v1, 0)
1342
+ _v1 = @struct.to_ptr
1343
+ _v2 = GObject::Values_cmp.get_value_from_pointer(_v1, 48)
1541
1344
  _v2
1542
1345
  end
1543
1346
  end
1544
1347
  class GObject::ParamSpecUChar < GObject::ParamSpec
1545
1348
 
1546
- def default_value
1547
- _v1 = (@struct.to_ptr + 74)
1548
- _v2 = _v1.get_uint8(0)
1549
- _v2
1550
- end
1551
- def maximum
1552
- _v1 = (@struct.to_ptr + 73)
1553
- _v2 = _v1.get_uint8(0)
1554
- _v2
1555
- end
1556
- def minimum
1557
- _v1 = (@struct.to_ptr + 72)
1558
- _v2 = _v1.get_uint8(0)
1559
- _v2
1560
- end
1349
+
1561
1350
  end
1562
1351
  class GObject::ParamSpecUInt < GObject::ParamSpec
1563
1352
 
1564
- def default_value
1565
- _v1 = (@struct.to_ptr + 80)
1566
- _v2 = _v1.get_uint32(0)
1567
- _v2
1568
- end
1569
- def maximum
1570
- _v1 = (@struct.to_ptr + 76)
1571
- _v2 = _v1.get_uint32(0)
1572
- _v2
1573
- end
1574
- def minimum
1575
- _v1 = (@struct.to_ptr + 72)
1576
- _v2 = _v1.get_uint32(0)
1577
- _v2
1578
- end
1353
+
1579
1354
  end
1580
1355
  class GObject::ParamSpecUInt64 < GObject::ParamSpec
1581
1356
 
1582
- def default_value
1583
- _v1 = (@struct.to_ptr + 88)
1584
- _v2 = _v1.get_uint64(0)
1585
- _v2
1586
- end
1587
- def maximum
1588
- _v1 = (@struct.to_ptr + 80)
1589
- _v2 = _v1.get_uint64(0)
1590
- _v2
1591
- end
1592
- def minimum
1593
- _v1 = (@struct.to_ptr + 72)
1594
- _v2 = _v1.get_uint64(0)
1595
- _v2
1596
- end
1357
+
1597
1358
  end
1598
1359
  class GObject::ParamSpecULong < GObject::ParamSpec
1599
1360
 
1600
- def default_value
1601
- _v1 = (@struct.to_ptr + 88)
1602
- _v2 = _v1.get_uint64(0)
1603
- _v2
1604
- end
1605
- def maximum
1606
- _v1 = (@struct.to_ptr + 80)
1607
- _v2 = _v1.get_uint64(0)
1608
- _v2
1609
- end
1610
- def minimum
1611
- _v1 = (@struct.to_ptr + 72)
1612
- _v2 = _v1.get_uint64(0)
1613
- _v2
1614
- end
1361
+
1615
1362
  end
1616
1363
  class GObject::ParamSpecUnichar < GObject::ParamSpec
1617
1364
 
1618
- def default_value
1619
- _v1 = (@struct.to_ptr + 72)
1620
- _v2 = _v1.get_uint32(0)
1621
- _v2
1622
- end
1365
+
1623
1366
  end
1624
1367
  class GObject::ParamSpecValueArray < GObject::ParamSpec
1625
1368
 
1626
- def element_spec
1627
- _v1 = (@struct.to_ptr + 72)
1628
- _v2 = _v1.get_pointer(0)
1629
- _v3 = GObject::ParamSpec.wrap(_v2)
1630
- _v3
1631
- end
1632
- def fixed_n_elements
1633
- _v1 = (@struct.to_ptr + 80)
1634
- _v2 = _v1.get_uint32(0)
1635
- _v2
1636
- end
1369
+
1637
1370
  end
1638
1371
  class GObject::ParamSpecVariant < GObject::ParamSpec
1639
1372
 
1640
- def padding
1641
- _v1 = (@struct.to_ptr + 88)
1642
- _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 0)
1643
- _v3 = GirFFI::SizedArray.wrap([:pointer, :void], 4, _v2)
1644
- _v3
1645
- end
1373
+
1646
1374
  end
1647
1375
  class GObject::Parameter < GirFFI::StructBase
1648
1376
 
1649
1377
  def name
1650
- _v1 = (@struct.to_ptr + 0)
1378
+ _v1 = @struct.to_ptr
1651
1379
  _v2 = _v1.get_pointer(0)
1652
1380
  _v3 = _v2.to_utf8
1653
1381
  _v3
1654
1382
  end
1655
1383
  def name=(value)
1656
- _v1 = (@struct.to_ptr + 0)
1384
+ _v1 = @struct.to_ptr
1657
1385
  _v2 = GirFFI::InPointer.from_utf8(value)
1658
1386
  _v1.put_pointer(0, _v2)
1659
1387
  end
1660
1388
  def value
1661
- _v1 = (@struct.to_ptr + 8)
1662
- _v2 = GObject::Value.get_value_from_pointer(_v1, 0)
1389
+ _v1 = @struct.to_ptr
1390
+ _v2 = GObject::Value.get_value_from_pointer(_v1, 8)
1663
1391
  _v3 = GObject::Value.wrap(_v2)
1664
1392
  _v3
1665
1393
  end
1666
1394
  def value=(value)
1667
- _v1 = (@struct.to_ptr + 8)
1395
+ _v1 = @struct.to_ptr
1668
1396
  _v2 = GObject::Value.copy_from(value)
1669
- GObject::Value.copy_value_to_pointer(_v2, _v1)
1397
+ GObject::Value.copy_value_to_pointer(_v2, _v1, 8)
1670
1398
  end
1671
1399
  end
1672
1400
  SIGNAL_FLAGS_MASK = 511
@@ -1677,32 +1405,32 @@ module GObject
1677
1405
  class GObject::SignalInvocationHint < GirFFI::StructBase
1678
1406
 
1679
1407
  def detail
1680
- _v1 = (@struct.to_ptr + 4)
1681
- _v2 = _v1.get_uint32(0)
1408
+ _v1 = @struct.to_ptr
1409
+ _v2 = _v1.get_uint32(4)
1682
1410
  _v2
1683
1411
  end
1684
1412
  def detail=(value)
1685
- _v1 = (@struct.to_ptr + 4)
1413
+ _v1 = @struct.to_ptr
1686
1414
  _v2 = value
1687
- _v1.put_uint32(0, _v2)
1415
+ _v1.put_uint32(4, _v2)
1688
1416
  end
1689
1417
  def run_type
1690
- _v1 = (@struct.to_ptr + 8)
1691
- _v2 = GObject::SignalFlags.get_value_from_pointer(_v1, 0)
1418
+ _v1 = @struct.to_ptr
1419
+ _v2 = GObject::SignalFlags.get_value_from_pointer(_v1, 8)
1692
1420
  _v2
1693
1421
  end
1694
1422
  def run_type=(value)
1695
- _v1 = (@struct.to_ptr + 8)
1423
+ _v1 = @struct.to_ptr
1696
1424
  _v2 = value
1697
- GObject::SignalFlags.copy_value_to_pointer(_v2, _v1)
1425
+ GObject::SignalFlags.copy_value_to_pointer(_v2, _v1, 8)
1698
1426
  end
1699
1427
  def signal_id
1700
- _v1 = (@struct.to_ptr + 0)
1428
+ _v1 = @struct.to_ptr
1701
1429
  _v2 = _v1.get_uint32(0)
1702
1430
  _v2
1703
1431
  end
1704
1432
  def signal_id=(value)
1705
- _v1 = (@struct.to_ptr + 0)
1433
+ _v1 = @struct.to_ptr
1706
1434
  _v2 = value
1707
1435
  _v1.put_uint32(0, _v2)
1708
1436
  end
@@ -1711,78 +1439,78 @@ module GObject
1711
1439
  class GObject::SignalQuery < GirFFI::StructBase
1712
1440
 
1713
1441
  def itype
1714
- _v1 = (@struct.to_ptr + 16)
1715
- _v2 = _v1.get_uint64(0)
1442
+ _v1 = @struct.to_ptr
1443
+ _v2 = _v1.get_uint64(16)
1716
1444
  _v2
1717
1445
  end
1718
1446
  def itype=(value)
1719
- _v1 = (@struct.to_ptr + 16)
1447
+ _v1 = @struct.to_ptr
1720
1448
  _v2 = value
1721
- _v1.put_uint64(0, _v2)
1449
+ _v1.put_uint64(16, _v2)
1722
1450
  end
1723
1451
  def n_params
1724
- _v1 = (@struct.to_ptr + 40)
1725
- _v2 = _v1.get_uint32(0)
1452
+ _v1 = @struct.to_ptr
1453
+ _v2 = _v1.get_uint32(40)
1726
1454
  _v2
1727
1455
  end
1728
1456
  def n_params=(value)
1729
- _v1 = (@struct.to_ptr + 40)
1457
+ _v1 = @struct.to_ptr
1730
1458
  _v2 = value
1731
- _v1.put_uint32(0, _v2)
1459
+ _v1.put_uint32(40, _v2)
1732
1460
  end
1733
1461
  def param_types
1734
- _v1 = (@struct.to_ptr + 40)
1735
- _v2 = _v1.get_uint32(0)
1736
- _v3 = (@struct.to_ptr + 48)
1737
- _v4 = _v3.get_pointer(0)
1462
+ _v1 = @struct.to_ptr
1463
+ _v2 = _v1.get_uint32(40)
1464
+ _v3 = @struct.to_ptr
1465
+ _v4 = _v3.get_pointer(48)
1738
1466
  _v5 = GirFFI::SizedArray.wrap(:GType, _v2, _v4)
1739
1467
  _v5
1740
1468
  end
1741
1469
  def param_types=(value)
1742
- _v1 = (@struct.to_ptr + 48)
1470
+ _v1 = @struct.to_ptr
1743
1471
  _v2 = GirFFI::SizedArray.copy_from(:GType, -1, value)
1744
- _v1.put_pointer(0, _v2)
1472
+ _v1.put_pointer(48, _v2)
1745
1473
  end
1746
1474
  def return_type
1747
- _v1 = (@struct.to_ptr + 32)
1748
- _v2 = _v1.get_uint64(0)
1475
+ _v1 = @struct.to_ptr
1476
+ _v2 = _v1.get_uint64(32)
1749
1477
  _v2
1750
1478
  end
1751
1479
  def return_type=(value)
1752
- _v1 = (@struct.to_ptr + 32)
1480
+ _v1 = @struct.to_ptr
1753
1481
  _v2 = value
1754
- _v1.put_uint64(0, _v2)
1482
+ _v1.put_uint64(32, _v2)
1755
1483
  end
1756
1484
  def signal_flags
1757
- _v1 = (@struct.to_ptr + 24)
1758
- _v2 = GObject::SignalFlags.get_value_from_pointer(_v1, 0)
1485
+ _v1 = @struct.to_ptr
1486
+ _v2 = GObject::SignalFlags.get_value_from_pointer(_v1, 24)
1759
1487
  _v2
1760
1488
  end
1761
1489
  def signal_flags=(value)
1762
- _v1 = (@struct.to_ptr + 24)
1490
+ _v1 = @struct.to_ptr
1763
1491
  _v2 = value
1764
- GObject::SignalFlags.copy_value_to_pointer(_v2, _v1)
1492
+ GObject::SignalFlags.copy_value_to_pointer(_v2, _v1, 24)
1765
1493
  end
1766
1494
  def signal_id
1767
- _v1 = (@struct.to_ptr + 0)
1495
+ _v1 = @struct.to_ptr
1768
1496
  _v2 = _v1.get_uint32(0)
1769
1497
  _v2
1770
1498
  end
1771
1499
  def signal_id=(value)
1772
- _v1 = (@struct.to_ptr + 0)
1500
+ _v1 = @struct.to_ptr
1773
1501
  _v2 = value
1774
1502
  _v1.put_uint32(0, _v2)
1775
1503
  end
1776
1504
  def signal_name
1777
- _v1 = (@struct.to_ptr + 8)
1778
- _v2 = _v1.get_pointer(0)
1505
+ _v1 = @struct.to_ptr
1506
+ _v2 = _v1.get_pointer(8)
1779
1507
  _v3 = _v2.to_utf8
1780
1508
  _v3
1781
1509
  end
1782
1510
  def signal_name=(value)
1783
- _v1 = (@struct.to_ptr + 8)
1511
+ _v1 = @struct.to_ptr
1784
1512
  _v2 = GirFFI::InPointer.from_utf8(value)
1785
- _v1.put_pointer(0, _v2)
1513
+ _v1.put_pointer(8, _v2)
1786
1514
  end
1787
1515
  end
1788
1516
  TYPE_FLAG_RESERVED_ID_BIT = 1
@@ -1824,7 +1552,7 @@ module GObject
1824
1552
  GObject::Lib.g_type_class_add_private(self, _v1)
1825
1553
  end
1826
1554
  def g_type
1827
- _v1 = (@struct.to_ptr + 0)
1555
+ _v1 = @struct.to_ptr
1828
1556
  _v2 = _v1.get_uint64(0)
1829
1557
  _v2
1830
1558
  end
@@ -1841,6 +1569,7 @@ module GObject
1841
1569
  def unref
1842
1570
  GObject::Lib.g_type_class_unref(self)
1843
1571
  end
1572
+ alias_method 'private', 'get_private'
1844
1573
  end
1845
1574
  # XXX: Don't know how to print callback
1846
1575
  # XXX: Don't know how to print flags
@@ -1849,12 +1578,12 @@ module GObject
1849
1578
  class GObject::TypeFundamentalInfo < GirFFI::StructBase
1850
1579
 
1851
1580
  def type_flags
1852
- _v1 = (@struct.to_ptr + 0)
1581
+ _v1 = @struct.to_ptr
1853
1582
  _v2 = GObject::TypeFundamentalFlags.get_value_from_pointer(_v1, 0)
1854
1583
  _v2
1855
1584
  end
1856
1585
  def type_flags=(value)
1857
- _v1 = (@struct.to_ptr + 0)
1586
+ _v1 = @struct.to_ptr
1858
1587
  _v2 = value
1859
1588
  GObject::TypeFundamentalFlags.copy_value_to_pointer(_v2, _v1)
1860
1589
  end
@@ -1862,111 +1591,111 @@ module GObject
1862
1591
  class GObject::TypeInfo < GirFFI::StructBase
1863
1592
 
1864
1593
  def base_finalize
1865
- _v1 = (@struct.to_ptr + 16)
1866
- _v2 = GObject::BaseFinalizeFunc.get_value_from_pointer(_v1, 0)
1594
+ _v1 = @struct.to_ptr
1595
+ _v2 = GObject::BaseFinalizeFunc.get_value_from_pointer(_v1, 16)
1867
1596
  _v2
1868
1597
  end
1869
1598
  def base_finalize=(value)
1870
- _v1 = (@struct.to_ptr + 16)
1599
+ _v1 = @struct.to_ptr
1871
1600
  _v2 = GObject::BaseFinalizeFunc.from(value)
1872
- GObject::BaseFinalizeFunc.copy_value_to_pointer(_v2, _v1)
1601
+ GObject::BaseFinalizeFunc.copy_value_to_pointer(_v2, _v1, 16)
1873
1602
  end
1874
1603
  def base_init
1875
- _v1 = (@struct.to_ptr + 8)
1876
- _v2 = GObject::BaseInitFunc.get_value_from_pointer(_v1, 0)
1604
+ _v1 = @struct.to_ptr
1605
+ _v2 = GObject::BaseInitFunc.get_value_from_pointer(_v1, 8)
1877
1606
  _v2
1878
1607
  end
1879
1608
  def base_init=(value)
1880
- _v1 = (@struct.to_ptr + 8)
1609
+ _v1 = @struct.to_ptr
1881
1610
  _v2 = GObject::BaseInitFunc.from(value)
1882
- GObject::BaseInitFunc.copy_value_to_pointer(_v2, _v1)
1611
+ GObject::BaseInitFunc.copy_value_to_pointer(_v2, _v1, 8)
1883
1612
  end
1884
1613
  def class_data
1885
- _v1 = (@struct.to_ptr + 40)
1886
- _v2 = _v1.get_pointer(0)
1614
+ _v1 = @struct.to_ptr
1615
+ _v2 = _v1.get_pointer(40)
1887
1616
  _v2
1888
1617
  end
1889
1618
  def class_data=(value)
1890
- _v1 = (@struct.to_ptr + 40)
1619
+ _v1 = @struct.to_ptr
1891
1620
  _v2 = value
1892
- _v1.put_pointer(0, _v2)
1621
+ _v1.put_pointer(40, _v2)
1893
1622
  end
1894
1623
  def class_finalize
1895
- _v1 = (@struct.to_ptr + 32)
1896
- _v2 = GObject::ClassFinalizeFunc.get_value_from_pointer(_v1, 0)
1624
+ _v1 = @struct.to_ptr
1625
+ _v2 = GObject::ClassFinalizeFunc.get_value_from_pointer(_v1, 32)
1897
1626
  _v2
1898
1627
  end
1899
1628
  def class_finalize=(value)
1900
- _v1 = (@struct.to_ptr + 32)
1629
+ _v1 = @struct.to_ptr
1901
1630
  _v2 = GObject::ClassFinalizeFunc.from(value)
1902
- GObject::ClassFinalizeFunc.copy_value_to_pointer(_v2, _v1)
1631
+ GObject::ClassFinalizeFunc.copy_value_to_pointer(_v2, _v1, 32)
1903
1632
  end
1904
1633
  def class_init
1905
- _v1 = (@struct.to_ptr + 24)
1906
- _v2 = GObject::ClassInitFunc.get_value_from_pointer(_v1, 0)
1634
+ _v1 = @struct.to_ptr
1635
+ _v2 = GObject::ClassInitFunc.get_value_from_pointer(_v1, 24)
1907
1636
  _v2
1908
1637
  end
1909
1638
  def class_init=(value)
1910
- _v1 = (@struct.to_ptr + 24)
1639
+ _v1 = @struct.to_ptr
1911
1640
  _v2 = GObject::ClassInitFunc.from(value)
1912
- GObject::ClassInitFunc.copy_value_to_pointer(_v2, _v1)
1641
+ GObject::ClassInitFunc.copy_value_to_pointer(_v2, _v1, 24)
1913
1642
  end
1914
1643
  def class_size
1915
- _v1 = (@struct.to_ptr + 0)
1644
+ _v1 = @struct.to_ptr
1916
1645
  _v2 = _v1.get_uint16(0)
1917
1646
  _v2
1918
1647
  end
1919
1648
  def class_size=(value)
1920
- _v1 = (@struct.to_ptr + 0)
1649
+ _v1 = @struct.to_ptr
1921
1650
  _v2 = value
1922
1651
  _v1.put_uint16(0, _v2)
1923
1652
  end
1924
1653
  def instance_init
1925
- _v1 = (@struct.to_ptr + 56)
1926
- _v2 = GObject::InstanceInitFunc.get_value_from_pointer(_v1, 0)
1654
+ _v1 = @struct.to_ptr
1655
+ _v2 = GObject::InstanceInitFunc.get_value_from_pointer(_v1, 56)
1927
1656
  _v2
1928
1657
  end
1929
1658
  def instance_init=(value)
1930
- _v1 = (@struct.to_ptr + 56)
1659
+ _v1 = @struct.to_ptr
1931
1660
  _v2 = GObject::InstanceInitFunc.from(value)
1932
- GObject::InstanceInitFunc.copy_value_to_pointer(_v2, _v1)
1661
+ GObject::InstanceInitFunc.copy_value_to_pointer(_v2, _v1, 56)
1933
1662
  end
1934
1663
  def instance_size
1935
- _v1 = (@struct.to_ptr + 48)
1936
- _v2 = _v1.get_uint16(0)
1664
+ _v1 = @struct.to_ptr
1665
+ _v2 = _v1.get_uint16(48)
1937
1666
  _v2
1938
1667
  end
1939
1668
  def instance_size=(value)
1940
- _v1 = (@struct.to_ptr + 48)
1669
+ _v1 = @struct.to_ptr
1941
1670
  _v2 = value
1942
- _v1.put_uint16(0, _v2)
1671
+ _v1.put_uint16(48, _v2)
1943
1672
  end
1944
1673
  def n_preallocs
1945
- _v1 = (@struct.to_ptr + 50)
1946
- _v2 = _v1.get_uint16(0)
1674
+ _v1 = @struct.to_ptr
1675
+ _v2 = _v1.get_uint16(50)
1947
1676
  _v2
1948
1677
  end
1949
1678
  def n_preallocs=(value)
1950
- _v1 = (@struct.to_ptr + 50)
1679
+ _v1 = @struct.to_ptr
1951
1680
  _v2 = value
1952
- _v1.put_uint16(0, _v2)
1681
+ _v1.put_uint16(50, _v2)
1953
1682
  end
1954
1683
  def value_table
1955
- _v1 = (@struct.to_ptr + 64)
1956
- _v2 = _v1.get_pointer(0)
1684
+ _v1 = @struct.to_ptr
1685
+ _v2 = _v1.get_pointer(64)
1957
1686
  _v3 = GObject::TypeValueTable.wrap(_v2)
1958
1687
  _v3
1959
1688
  end
1960
1689
  def value_table=(value)
1961
- _v1 = (@struct.to_ptr + 64)
1690
+ _v1 = @struct.to_ptr
1962
1691
  _v2 = GObject::TypeValueTable.copy_from(value)
1963
- _v1.put_pointer(0, _v2)
1692
+ _v1.put_pointer(64, _v2)
1964
1693
  end
1965
1694
  end
1966
1695
  class GObject::TypeInstance < GirFFI::StructBase
1967
1696
 
1968
1697
  def g_class
1969
- _v1 = (@struct.to_ptr + 0)
1698
+ _v1 = @struct.to_ptr
1970
1699
  _v2 = _v1.get_pointer(0)
1971
1700
  _v3 = GObject::TypeClass.wrap(_v2)
1972
1701
  _v3
@@ -1976,6 +1705,7 @@ module GObject
1976
1705
  _v2 = GObject::Lib.g_type_instance_get_private(self, _v1)
1977
1706
  return _v2
1978
1707
  end
1708
+ alias_method 'private', 'get_private'
1979
1709
  end
1980
1710
  class GObject::TypeInterface < GirFFI::StructBase
1981
1711
  def self.add_prerequisite(interface_type, prerequisite_type)
@@ -2006,12 +1736,12 @@ module GObject
2006
1736
  return _v5
2007
1737
  end
2008
1738
  def g_instance_type
2009
- _v1 = (@struct.to_ptr + 8)
2010
- _v2 = _v1.get_uint64(0)
1739
+ _v1 = @struct.to_ptr
1740
+ _v2 = _v1.get_uint64(8)
2011
1741
  _v2
2012
1742
  end
2013
1743
  def g_type
2014
- _v1 = (@struct.to_ptr + 0)
1744
+ _v1 = @struct.to_ptr
2015
1745
  _v2 = _v1.get_uint64(0)
2016
1746
  _v2
2017
1747
  end
@@ -2030,18 +1760,6 @@ module GObject
2030
1760
  _v3 = GObject::InterfaceInfo.from(interface_info)
2031
1761
  GObject::Lib.g_type_module_add_interface(self, _v1, _v2, _v3)
2032
1762
  end
2033
- def interface_infos
2034
- _v1 = (@struct.to_ptr + 40)
2035
- _v2 = _v1.get_pointer(0)
2036
- _v3 = GLib::SList.wrap([:pointer, :void], _v2)
2037
- _v3
2038
- end
2039
- def name
2040
- _v1 = (@struct.to_ptr + 48)
2041
- _v2 = _v1.get_pointer(0)
2042
- _v3 = _v2.to_utf8
2043
- _v3
2044
- end
2045
1763
  def register_enum(name, const_static_values)
2046
1764
  _v1 = GirFFI::InPointer.from_utf8(name)
2047
1765
  _v2 = GObject::EnumValue.from(const_static_values)
@@ -2066,12 +1784,6 @@ module GObject
2066
1784
  _v1 = GirFFI::InPointer.from_utf8(name)
2067
1785
  GObject::Lib.g_type_module_set_name(self, _v1)
2068
1786
  end
2069
- def type_infos
2070
- _v1 = (@struct.to_ptr + 32)
2071
- _v2 = _v1.get_pointer(0)
2072
- _v3 = GLib::SList.wrap([:pointer, :void], _v2)
2073
- _v3
2074
- end
2075
1787
  def unuse
2076
1788
  GObject::Lib.g_type_module_unuse(self)
2077
1789
  end
@@ -2079,48 +1791,44 @@ module GObject
2079
1791
  _v1 = GObject::Lib.g_type_module_use(self)
2080
1792
  return _v1
2081
1793
  end
2082
- def use_count
2083
- _v1 = (@struct.to_ptr + 24)
2084
- _v2 = _v1.get_uint32(0)
2085
- _v2
2086
- end
1794
+ alias_method 'name=', 'set_name'
2087
1795
  end
2088
1796
  class GObject::TypeModuleClass < GObject::ObjectClass
2089
1797
 
2090
1798
  def load
2091
- _v1 = (@struct.to_ptr + 136)
2092
- _v2 = GObject::Load.get_value_from_pointer(_v1, 0)
1799
+ _v1 = @struct.to_ptr
1800
+ _v2 = GObject::Load.get_value_from_pointer(_v1, 136)
2093
1801
  _v2
2094
1802
  end
2095
1803
  def parent_class
2096
- _v1 = (@struct.to_ptr + 0)
1804
+ _v1 = @struct.to_ptr
2097
1805
  _v2 = GObject::ObjectClass.get_value_from_pointer(_v1, 0)
2098
1806
  _v3 = GObject::ObjectClass.wrap(_v2)
2099
1807
  _v3
2100
1808
  end
2101
1809
  def reserved1
2102
- _v1 = (@struct.to_ptr + 152)
2103
- _v2 = GObject::Reserved1.get_value_from_pointer(_v1, 0)
1810
+ _v1 = @struct.to_ptr
1811
+ _v2 = GObject::Reserved1.get_value_from_pointer(_v1, 152)
2104
1812
  _v2
2105
1813
  end
2106
1814
  def reserved2
2107
- _v1 = (@struct.to_ptr + 160)
2108
- _v2 = GObject::Reserved2.get_value_from_pointer(_v1, 0)
1815
+ _v1 = @struct.to_ptr
1816
+ _v2 = GObject::Reserved2.get_value_from_pointer(_v1, 160)
2109
1817
  _v2
2110
1818
  end
2111
1819
  def reserved3
2112
- _v1 = (@struct.to_ptr + 168)
2113
- _v2 = GObject::Reserved3.get_value_from_pointer(_v1, 0)
1820
+ _v1 = @struct.to_ptr
1821
+ _v2 = GObject::Reserved3.get_value_from_pointer(_v1, 168)
2114
1822
  _v2
2115
1823
  end
2116
1824
  def reserved4
2117
- _v1 = (@struct.to_ptr + 176)
2118
- _v2 = GObject::Reserved4.get_value_from_pointer(_v1, 0)
1825
+ _v1 = @struct.to_ptr
1826
+ _v2 = GObject::Reserved4.get_value_from_pointer(_v1, 176)
2119
1827
  _v2
2120
1828
  end
2121
1829
  def unload
2122
- _v1 = (@struct.to_ptr + 144)
2123
- _v2 = GObject::Unload.get_value_from_pointer(_v1, 0)
1830
+ _v1 = @struct.to_ptr
1831
+ _v2 = GObject::Unload.get_value_from_pointer(_v1, 144)
2124
1832
  _v2
2125
1833
  end
2126
1834
  end
@@ -2128,50 +1836,50 @@ module GObject
2128
1836
  class GObject::TypePluginClass < GirFFI::StructBase
2129
1837
 
2130
1838
  def base_iface
2131
- _v1 = (@struct.to_ptr + 0)
1839
+ _v1 = @struct.to_ptr
2132
1840
  _v2 = GObject::TypeInterface.get_value_from_pointer(_v1, 0)
2133
1841
  _v3 = GObject::TypeInterface.wrap(_v2)
2134
1842
  _v3
2135
1843
  end
2136
1844
  def complete_interface_info
2137
- _v1 = (@struct.to_ptr + 40)
2138
- _v2 = GObject::TypePluginCompleteInterfaceInfo.get_value_from_pointer(_v1, 0)
1845
+ _v1 = @struct.to_ptr
1846
+ _v2 = GObject::TypePluginCompleteInterfaceInfo.get_value_from_pointer(_v1, 40)
2139
1847
  _v2
2140
1848
  end
2141
1849
  def complete_interface_info=(value)
2142
- _v1 = (@struct.to_ptr + 40)
1850
+ _v1 = @struct.to_ptr
2143
1851
  _v2 = GObject::TypePluginCompleteInterfaceInfo.from(value)
2144
- GObject::TypePluginCompleteInterfaceInfo.copy_value_to_pointer(_v2, _v1)
1852
+ GObject::TypePluginCompleteInterfaceInfo.copy_value_to_pointer(_v2, _v1, 40)
2145
1853
  end
2146
1854
  def complete_type_info
2147
- _v1 = (@struct.to_ptr + 32)
2148
- _v2 = GObject::TypePluginCompleteTypeInfo.get_value_from_pointer(_v1, 0)
1855
+ _v1 = @struct.to_ptr
1856
+ _v2 = GObject::TypePluginCompleteTypeInfo.get_value_from_pointer(_v1, 32)
2149
1857
  _v2
2150
1858
  end
2151
1859
  def complete_type_info=(value)
2152
- _v1 = (@struct.to_ptr + 32)
1860
+ _v1 = @struct.to_ptr
2153
1861
  _v2 = GObject::TypePluginCompleteTypeInfo.from(value)
2154
- GObject::TypePluginCompleteTypeInfo.copy_value_to_pointer(_v2, _v1)
1862
+ GObject::TypePluginCompleteTypeInfo.copy_value_to_pointer(_v2, _v1, 32)
2155
1863
  end
2156
1864
  def unuse_plugin
2157
- _v1 = (@struct.to_ptr + 24)
2158
- _v2 = GObject::TypePluginUnuse.get_value_from_pointer(_v1, 0)
1865
+ _v1 = @struct.to_ptr
1866
+ _v2 = GObject::TypePluginUnuse.get_value_from_pointer(_v1, 24)
2159
1867
  _v2
2160
1868
  end
2161
1869
  def unuse_plugin=(value)
2162
- _v1 = (@struct.to_ptr + 24)
1870
+ _v1 = @struct.to_ptr
2163
1871
  _v2 = GObject::TypePluginUnuse.from(value)
2164
- GObject::TypePluginUnuse.copy_value_to_pointer(_v2, _v1)
1872
+ GObject::TypePluginUnuse.copy_value_to_pointer(_v2, _v1, 24)
2165
1873
  end
2166
1874
  def use_plugin
2167
- _v1 = (@struct.to_ptr + 16)
2168
- _v2 = GObject::TypePluginUse.get_value_from_pointer(_v1, 0)
1875
+ _v1 = @struct.to_ptr
1876
+ _v2 = GObject::TypePluginUse.get_value_from_pointer(_v1, 16)
2169
1877
  _v2
2170
1878
  end
2171
1879
  def use_plugin=(value)
2172
- _v1 = (@struct.to_ptr + 16)
1880
+ _v1 = @struct.to_ptr
2173
1881
  _v2 = GObject::TypePluginUse.from(value)
2174
- GObject::TypePluginUse.copy_value_to_pointer(_v2, _v1)
1882
+ GObject::TypePluginUse.copy_value_to_pointer(_v2, _v1, 16)
2175
1883
  end
2176
1884
  end
2177
1885
  # XXX: Don't know how to print callback
@@ -2181,103 +1889,102 @@ module GObject
2181
1889
  class GObject::TypeQuery < GirFFI::StructBase
2182
1890
 
2183
1891
  def class_size
2184
- _v1 = (@struct.to_ptr + 16)
2185
- _v2 = _v1.get_uint32(0)
1892
+ _v1 = @struct.to_ptr
1893
+ _v2 = _v1.get_uint32(16)
2186
1894
  _v2
2187
1895
  end
2188
1896
  def class_size=(value)
2189
- _v1 = (@struct.to_ptr + 16)
1897
+ _v1 = @struct.to_ptr
2190
1898
  _v2 = value
2191
- _v1.put_uint32(0, _v2)
1899
+ _v1.put_uint32(16, _v2)
2192
1900
  end
2193
1901
  def instance_size
2194
- _v1 = (@struct.to_ptr + 20)
2195
- _v2 = _v1.get_uint32(0)
1902
+ _v1 = @struct.to_ptr
1903
+ _v2 = _v1.get_uint32(20)
2196
1904
  _v2
2197
1905
  end
2198
1906
  def instance_size=(value)
2199
- _v1 = (@struct.to_ptr + 20)
1907
+ _v1 = @struct.to_ptr
2200
1908
  _v2 = value
2201
- _v1.put_uint32(0, _v2)
1909
+ _v1.put_uint32(20, _v2)
2202
1910
  end
2203
1911
  def type
2204
- _v1 = (@struct.to_ptr + 0)
1912
+ _v1 = @struct.to_ptr
2205
1913
  _v2 = _v1.get_uint64(0)
2206
1914
  _v2
2207
1915
  end
2208
1916
  def type=(value)
2209
- _v1 = (@struct.to_ptr + 0)
1917
+ _v1 = @struct.to_ptr
2210
1918
  _v2 = value
2211
1919
  _v1.put_uint64(0, _v2)
2212
1920
  end
2213
1921
  def type_name
2214
- _v1 = (@struct.to_ptr + 8)
2215
- _v2 = _v1.get_pointer(0)
1922
+ _v1 = @struct.to_ptr
1923
+ _v2 = _v1.get_pointer(8)
2216
1924
  _v3 = _v2.to_utf8
2217
1925
  _v3
2218
1926
  end
2219
1927
  def type_name=(value)
2220
- _v1 = (@struct.to_ptr + 8)
1928
+ _v1 = @struct.to_ptr
2221
1929
  _v2 = GirFFI::InPointer.from_utf8(value)
2222
- _v1.put_pointer(0, _v2)
1930
+ _v1.put_pointer(8, _v2)
2223
1931
  end
2224
1932
  end
2225
1933
  class GObject::TypeValueTable < GirFFI::StructBase
2226
1934
 
2227
1935
  def collect_format
2228
- _v1 = (@struct.to_ptr + 32)
2229
- _v2 = _v1.get_pointer(0)
1936
+ _v1 = @struct.to_ptr
1937
+ _v2 = _v1.get_pointer(32)
2230
1938
  _v3 = _v2.to_utf8
2231
1939
  _v3
2232
1940
  end
2233
1941
  def collect_format=(value)
2234
- _v1 = (@struct.to_ptr + 32)
1942
+ _v1 = @struct.to_ptr
2235
1943
  _v2 = GirFFI::InPointer.from_utf8(value)
2236
- _v1.put_pointer(0, _v2)
1944
+ _v1.put_pointer(32, _v2)
2237
1945
  end
2238
1946
  def collect_value
2239
- _v1 = (@struct.to_ptr + 40)
2240
- _v2 = GObject::Collect_value.get_value_from_pointer(_v1, 0)
1947
+ _v1 = @struct.to_ptr
1948
+ _v2 = GObject::Collect_value.get_value_from_pointer(_v1, 40)
2241
1949
  _v2
2242
1950
  end
2243
1951
  def lcopy_format
2244
- _v1 = (@struct.to_ptr + 48)
2245
- _v2 = _v1.get_pointer(0)
1952
+ _v1 = @struct.to_ptr
1953
+ _v2 = _v1.get_pointer(48)
2246
1954
  _v3 = _v2.to_utf8
2247
1955
  _v3
2248
1956
  end
2249
1957
  def lcopy_format=(value)
2250
- _v1 = (@struct.to_ptr + 48)
1958
+ _v1 = @struct.to_ptr
2251
1959
  _v2 = GirFFI::InPointer.from_utf8(value)
2252
- _v1.put_pointer(0, _v2)
1960
+ _v1.put_pointer(48, _v2)
2253
1961
  end
2254
1962
  def lcopy_value
2255
- _v1 = (@struct.to_ptr + 56)
2256
- _v2 = GObject::Lcopy_value.get_value_from_pointer(_v1, 0)
1963
+ _v1 = @struct.to_ptr
1964
+ _v2 = GObject::Lcopy_value.get_value_from_pointer(_v1, 56)
2257
1965
  _v2
2258
1966
  end
2259
1967
  def value_copy
2260
- _v1 = (@struct.to_ptr + 16)
2261
- _v2 = GObject::Value_copy.get_value_from_pointer(_v1, 0)
1968
+ _v1 = @struct.to_ptr
1969
+ _v2 = GObject::Value_copy.get_value_from_pointer(_v1, 16)
2262
1970
  _v2
2263
1971
  end
2264
1972
  def value_free
2265
- _v1 = (@struct.to_ptr + 8)
2266
- _v2 = GObject::Value_free.get_value_from_pointer(_v1, 0)
1973
+ _v1 = @struct.to_ptr
1974
+ _v2 = GObject::Value_free.get_value_from_pointer(_v1, 8)
2267
1975
  _v2
2268
1976
  end
2269
1977
  def value_init
2270
- _v1 = (@struct.to_ptr + 0)
1978
+ _v1 = @struct.to_ptr
2271
1979
  _v2 = GObject::Value_init.get_value_from_pointer(_v1, 0)
2272
1980
  _v2
2273
1981
  end
2274
1982
  def value_peek_pointer
2275
- _v1 = (@struct.to_ptr + 24)
2276
- _v2 = GObject::Value_peek_pointer.get_value_from_pointer(_v1, 0)
1983
+ _v1 = @struct.to_ptr
1984
+ _v2 = GObject::Value_peek_pointer.get_value_from_pointer(_v1, 24)
2277
1985
  _v2
2278
1986
  end
2279
1987
  end
2280
- VALUE_COLLECT_FORMAT_MAX_LENGTH = 8
2281
1988
  VALUE_NOCOPY_CONTENTS = 134217728
2282
1989
  class GObject::Value < GirFFI::BoxedBase
2283
1990
  def self.copy_value_to_pointer(value, pointer, offset = 0)
@@ -2334,22 +2041,22 @@ module GObject
2334
2041
  GObject.type_fundamental(current_gtype)
2335
2042
  end
2336
2043
  def current_gtype
2337
- @struct[:g_type]
2044
+ struct[:g_type]
2338
2045
  end
2339
2046
  def current_gtype_name
2340
2047
  GObject.type_name(current_gtype)
2341
2048
  end
2342
2049
  def data
2343
- _v1 = (@struct.to_ptr + 8)
2344
- _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 0)
2050
+ _v1 = @struct.to_ptr
2051
+ _v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 8)
2345
2052
  _v3 = GirFFI::SizedArray.wrap(GObject::Private___Value__data__union, 2, _v2)
2346
2053
  _v3
2347
2054
  end
2348
2055
  def data=(value)
2349
- _v1 = (@struct.to_ptr + 8)
2056
+ _v1 = @struct.to_ptr
2350
2057
  GirFFI::ArgHelper.check_fixed_array_size(2, value, "value")
2351
2058
  _v2 = GirFFI::SizedArray.copy_from(GObject::Private___Value__data__union, 2, value)
2352
- GirFFI::SizedArray.copy_value_to_pointer(_v2, _v1)
2059
+ GirFFI::SizedArray.copy_value_to_pointer(_v2, _v1, 8)
2353
2060
  end
2354
2061
  def dup_object
2355
2062
  _v1 = GObject::Lib.g_value_dup_object(self)
@@ -2371,7 +2078,7 @@ module GObject
2371
2078
  return _v1
2372
2079
  end
2373
2080
  def g_type
2374
- _v1 = (@struct.to_ptr + 0)
2081
+ _v1 = @struct.to_ptr
2375
2082
  _v2 = _v1.get_uint64(0)
2376
2083
  _v2
2377
2084
  end
@@ -2467,7 +2174,7 @@ module GObject
2467
2174
  end
2468
2175
  def get_variant
2469
2176
  _v1 = GObject::Lib.g_value_get_variant(self)
2470
- _v2 = GLib::Variant.wrap_own(_v1)
2177
+ _v2 = GLib::Variant.wrap_copy(_v1)
2471
2178
  return _v2
2472
2179
  end
2473
2180
  def init(type)
@@ -2620,7 +2327,54 @@ module GObject
2620
2327
  def unset
2621
2328
  GObject::Lib.g_value_unset(self)
2622
2329
  end
2330
+ alias_method 'boolean', 'get_boolean'
2331
+ alias_method 'boolean=', 'set_boolean'
2332
+ alias_method 'boxed', 'get_boxed'
2333
+ alias_method 'boxed=', 'set_boxed'
2334
+ alias_method 'boxed_take_ownership=', 'set_boxed_take_ownership'
2335
+ alias_method 'char', 'get_char'
2336
+ alias_method 'char=', 'set_char'
2337
+ alias_method 'double', 'get_double'
2338
+ alias_method 'double=', 'set_double'
2339
+ alias_method 'enum', 'get_enum'
2340
+ alias_method 'enum=', 'set_enum'
2341
+ alias_method 'flags', 'get_flags'
2342
+ alias_method 'flags=', 'set_flags'
2343
+ alias_method 'float', 'get_float'
2344
+ alias_method 'float=', 'set_float'
2345
+ alias_method 'gtype', 'get_gtype'
2346
+ alias_method 'gtype=', 'set_gtype'
2347
+ alias_method 'instance=', 'set_instance'
2348
+ alias_method 'int', 'get_int'
2349
+ alias_method 'int64', 'get_int64'
2350
+ alias_method 'int64=', 'set_int64'
2351
+ alias_method 'int=', 'set_int'
2352
+ alias_method 'long', 'get_long'
2353
+ alias_method 'long=', 'set_long'
2354
+ alias_method 'object', 'get_object'
2355
+ alias_method 'object=', 'set_object'
2356
+ alias_method 'param', 'get_param'
2357
+ alias_method 'param=', 'set_param'
2358
+ alias_method 'pointer', 'get_pointer'
2359
+ alias_method 'pointer=', 'set_pointer'
2360
+ alias_method 'schar', 'get_schar'
2361
+ alias_method 'schar=', 'set_schar'
2362
+ alias_method 'static_boxed=', 'set_static_boxed'
2363
+ alias_method 'static_string=', 'set_static_string'
2364
+ alias_method 'string', 'get_string'
2365
+ alias_method 'string=', 'set_string'
2366
+ alias_method 'string_take_ownership=', 'set_string_take_ownership'
2367
+ alias_method 'uchar', 'get_uchar'
2368
+ alias_method 'uchar=', 'set_uchar'
2369
+ alias_method 'uint', 'get_uint'
2370
+ alias_method 'uint64', 'get_uint64'
2371
+ alias_method 'uint64=', 'set_uint64'
2372
+ alias_method 'uint=', 'set_uint'
2373
+ alias_method 'ulong', 'get_ulong'
2374
+ alias_method 'ulong=', 'set_ulong'
2623
2375
  alias_method 'value=', 'set_value'
2376
+ alias_method 'variant', 'get_variant'
2377
+ alias_method 'variant=', 'set_variant'
2624
2378
  end
2625
2379
  class GObject::ValueArray < GirFFI::BoxedBase
2626
2380
  def self.new(*args, &block)
@@ -2653,17 +2407,17 @@ module GObject
2653
2407
  return _v4
2654
2408
  end
2655
2409
  def n_prealloced
2656
- _v1 = (@struct.to_ptr + 16)
2657
- _v2 = _v1.get_uint32(0)
2410
+ _v1 = @struct.to_ptr
2411
+ _v2 = _v1.get_uint32(16)
2658
2412
  _v2
2659
2413
  end
2660
2414
  def n_values
2661
- _v1 = (@struct.to_ptr + 0)
2415
+ _v1 = @struct.to_ptr
2662
2416
  _v2 = _v1.get_uint32(0)
2663
2417
  _v2
2664
2418
  end
2665
2419
  def n_values=(value)
2666
- _v1 = (@struct.to_ptr + 0)
2420
+ _v1 = @struct.to_ptr
2667
2421
  _v2 = value
2668
2422
  _v1.put_uint32(0, _v2)
2669
2423
  end
@@ -2687,16 +2441,17 @@ module GObject
2687
2441
  return _v4
2688
2442
  end
2689
2443
  def values
2690
- _v1 = (@struct.to_ptr + 8)
2691
- _v2 = _v1.get_pointer(0)
2444
+ _v1 = @struct.to_ptr
2445
+ _v2 = _v1.get_pointer(8)
2692
2446
  _v3 = GObject::Value.wrap(_v2)
2693
2447
  _v3
2694
2448
  end
2695
2449
  def values=(value)
2696
- _v1 = (@struct.to_ptr + 8)
2450
+ _v1 = @struct.to_ptr
2697
2451
  _v2 = GObject::Value.copy_from(value)
2698
- _v1.put_pointer(0, _v2)
2452
+ _v1.put_pointer(8, _v2)
2699
2453
  end
2454
+ alias_method 'nth', 'get_nth'
2700
2455
  end
2701
2456
  # XXX: Don't know how to print callback
2702
2457
  # XXX: Don't know how to print callback
@@ -3642,14 +3397,10 @@ module GObject
3642
3397
  GObject::Lib.g_type_free_instance(_v1)
3643
3398
  end
3644
3399
  def self.type_from_name(name)
3645
- _v1 = GirFFI::InPointer.from_utf8(name)
3646
- _v2 = GObject::Lib.g_type_from_name(_v1)
3647
- return _v2
3400
+ Lib.g_type_from_name(name)
3648
3401
  end
3649
- def self.type_fundamental(type_id)
3650
- _v1 = type_id
3651
- _v2 = GObject::Lib.g_type_fundamental(_v1)
3652
- return _v2
3402
+ def self.type_fundamental(gtype)
3403
+ Lib.g_type_fundamental(gtype)
3653
3404
  end
3654
3405
  def self.type_fundamental_next
3655
3406
  _v1 = GObject::Lib.g_type_fundamental_next
@@ -3737,10 +3488,7 @@ module GObject
3737
3488
  return _v3
3738
3489
  end
3739
3490
  def self.type_name_from_instance(instance)
3740
- _v1 = GObject::TypeInstance.from(instance)
3741
- _v2 = GObject::Lib.g_type_name_from_instance(_v1)
3742
- _v3 = _v2.to_utf8
3743
- return _v3
3491
+ type_name(type_from_instance(instance))
3744
3492
  end
3745
3493
  def self.type_next_base(leaf_type, root_type)
3746
3494
  _v1 = leaf_type