gir_ffi-pretty_printer 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +13 -13
- data/lib/gir_ffi-pretty_printer.rb +1 -1
- data/lib/gir_ffi-pretty_printer/class_pretty_printer.rb +9 -5
- data/lib/gir_ffi-pretty_printer/pretty_printer.rb +6 -6
- data/test/gir_ffi-pretty_printer/class_pretty_printer_test.rb +16 -16
- data/test/gir_ffi-pretty_printer/pretty_printer_test.rb +4 -4
- data/test/integration/actual_glib.rb +879 -622
- data/test/integration/actual_gobject.rb +472 -724
- data/test/integration/expected_glib.rb +879 -622
- data/test/integration/expected_gobject.rb +472 -724
- data/test/integration/glib_test.rb +7 -7
- data/test/integration/gobject_test.rb +7 -7
- data/test/test_helper.rb +5 -4
- metadata +24 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1069fe36c4d6afaec624545f576e29d679f3f1fa647aa2465a8cb44eeed87d5
|
4
|
+
data.tar.gz: a37aa00d3192cdd5cd9991b1c9222cc0343f8440603693e8d0a1c270eb736415
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56fb37cc7f6992719c904b18b8106fbb0e784a6bcf4460fe8585ce670cd17f5651dab269d0292fdc0416952139dc0acfb49b8e6712dba05c8be67ffb13116d14
|
7
|
+
data.tar.gz: 58641243903e74d9fa50662d430854b6ad30c72b4f5fc478d15f168c6d06368e9d4c0f33edb91d64036bd9895f295503e2d018282d58b95641db86cc74e6d78e
|
data/Rakefile
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "rake/clean"
|
4
|
+
require "bundler/gem_tasks"
|
5
|
+
require "rake/testtask"
|
6
6
|
|
7
7
|
namespace :test do
|
8
8
|
Rake::TestTask.new(:unit) do |t|
|
9
|
-
t.libs = [
|
10
|
-
t.ruby_opts += [
|
11
|
-
t.test_files = FileList[
|
9
|
+
t.libs = ["lib"]
|
10
|
+
t.ruby_opts += ["-w -Itest"]
|
11
|
+
t.test_files = FileList["test/gir_ffi-pretty_printer/*_test.rb"]
|
12
12
|
t.warning = true
|
13
13
|
end
|
14
14
|
|
15
15
|
Rake::TestTask.new(:integration) do |t|
|
16
|
-
t.libs = [
|
17
|
-
t.ruby_opts += [
|
18
|
-
t.test_files = FileList[
|
16
|
+
t.libs = ["lib"]
|
17
|
+
t.ruby_opts += ["-w -Itest"]
|
18
|
+
t.test_files = FileList["test/integration/*_test.rb"]
|
19
19
|
t.warning = true
|
20
20
|
end
|
21
21
|
|
@@ -23,11 +23,11 @@ namespace :test do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
begin
|
26
|
-
require
|
26
|
+
require "yard"
|
27
27
|
YARD::Rake::YardocTask.new
|
28
28
|
rescue LoadError
|
29
|
-
puts
|
29
|
+
puts "Install yard to enable the documentation tasks"
|
30
30
|
end
|
31
31
|
|
32
|
-
task test:
|
33
|
-
task default:
|
32
|
+
task test: "test:all"
|
33
|
+
task default: "test"
|
@@ -12,7 +12,7 @@ module GirFFI
|
|
12
12
|
arr << "class #{@klass.name} < #{@klass.superclass.name}"
|
13
13
|
arr << pretty_print_singleton_methods.indent
|
14
14
|
arr << pretty_print_instance_methods.indent
|
15
|
-
arr <<
|
15
|
+
arr << "end"
|
16
16
|
arr.join "\n"
|
17
17
|
end
|
18
18
|
|
@@ -36,11 +36,13 @@ module GirFFI
|
|
36
36
|
|
37
37
|
def pretty_print_alias(meth)
|
38
38
|
return if meth.name == meth.original_name
|
39
|
+
|
39
40
|
"alias_method '#{meth.name}', '#{meth.original_name}'"
|
40
41
|
end
|
41
42
|
|
42
43
|
def pretty_print_method(meth)
|
43
44
|
return if meth.name != meth.original_name
|
45
|
+
|
44
46
|
method_source meth
|
45
47
|
end
|
46
48
|
|
@@ -50,8 +52,8 @@ module GirFFI
|
|
50
52
|
|
51
53
|
if @klass.gir_info.find_instance_method name
|
52
54
|
@klass.setup_instance_method name
|
53
|
-
elsif name ==
|
54
|
-
@klass.setup_instance_method
|
55
|
+
elsif name == "_"
|
56
|
+
@klass.setup_instance_method ""
|
55
57
|
end
|
56
58
|
|
57
59
|
meth = @klass.instance_method name
|
@@ -68,13 +70,15 @@ module GirFFI
|
|
68
70
|
arr = []
|
69
71
|
@klass.methods(false).sort.each do |mname|
|
70
72
|
meth = @klass.method mname
|
73
|
+
ruby = meth.to_ruby
|
71
74
|
|
72
|
-
if meth.arity == -1
|
75
|
+
if meth.arity == -1 && ruby =~ /setup_and_call/
|
73
76
|
@klass.setup_method mname.to_s
|
74
77
|
meth = @klass.method mname
|
78
|
+
ruby = meth.to_ruby
|
75
79
|
end
|
76
80
|
|
77
|
-
arr <<
|
81
|
+
arr << ruby
|
78
82
|
end
|
79
83
|
arr.join "\n"
|
80
84
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
3
|
+
require "live_ast/full"
|
4
|
+
require "live_ast/to_ruby"
|
5
|
+
require "gir_ffi"
|
6
|
+
require "indentation"
|
7
|
+
require "gir_ffi-pretty_printer/class_pretty_printer"
|
8
8
|
|
9
9
|
module GirFFI
|
10
10
|
# Main pretty printer
|
@@ -14,7 +14,7 @@ module GirFFI
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def pretty_print_function(modul, mname)
|
17
|
-
modul.setup_method mname.to_s
|
17
|
+
modul.setup_method mname.to_s unless modul.methods.include?(mname.to_sym)
|
18
18
|
|
19
19
|
meth = modul.method mname
|
20
20
|
meth.to_ruby
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "test_helper"
|
4
4
|
|
5
5
|
class SimpleClass
|
6
6
|
def bar
|
7
|
-
|
7
|
+
"hello"
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
@@ -16,7 +16,7 @@ class ComplexAlias < SimpleClass
|
|
16
16
|
alias bar_without_qux bar
|
17
17
|
|
18
18
|
def bar_with_qux
|
19
|
-
bar_without_qux +
|
19
|
+
bar_without_qux + "-more"
|
20
20
|
end
|
21
21
|
|
22
22
|
alias bar bar_with_qux
|
@@ -25,11 +25,11 @@ end
|
|
25
25
|
describe GirFFI::ClassPrettyPrinter do
|
26
26
|
let(:instance) { GirFFI::ClassPrettyPrinter.new printed_class }
|
27
27
|
|
28
|
-
describe
|
29
|
-
describe
|
28
|
+
describe "#pretty_print" do
|
29
|
+
describe "for a class with a simple method definition" do
|
30
30
|
let(:printed_class) { SimpleClass }
|
31
|
-
it
|
32
|
-
expected =
|
31
|
+
it "pretty-prints the class" do
|
32
|
+
expected = <<~RUBY.chomp
|
33
33
|
class SimpleClass < Object
|
34
34
|
|
35
35
|
def bar
|
@@ -39,14 +39,14 @@ describe GirFFI::ClassPrettyPrinter do
|
|
39
39
|
RUBY
|
40
40
|
|
41
41
|
result = instance.pretty_print
|
42
|
-
result.must_equal expected
|
42
|
+
_(result).must_equal expected
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
describe
|
46
|
+
describe "for a class with a simple aliased method" do
|
47
47
|
let(:printed_class) { SimpleAlias }
|
48
|
-
it
|
49
|
-
expected =
|
48
|
+
it "pretty-prints the class" do
|
49
|
+
expected = <<~RUBY.chomp
|
50
50
|
class SimpleAlias < SimpleClass
|
51
51
|
|
52
52
|
alias_method 'foo', 'bar'
|
@@ -54,14 +54,14 @@ describe GirFFI::ClassPrettyPrinter do
|
|
54
54
|
RUBY
|
55
55
|
|
56
56
|
result = instance.pretty_print
|
57
|
-
result.must_equal expected
|
57
|
+
_(result).must_equal expected
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
describe
|
61
|
+
describe "for a class with an alias chain" do
|
62
62
|
let(:printed_class) { ComplexAlias }
|
63
|
-
it
|
64
|
-
expected =
|
63
|
+
it "pretty-prints the class" do
|
64
|
+
expected = <<~RUBY.chomp
|
65
65
|
class ComplexAlias < SimpleClass
|
66
66
|
|
67
67
|
def bar_with_qux
|
@@ -73,7 +73,7 @@ describe GirFFI::ClassPrettyPrinter do
|
|
73
73
|
RUBY
|
74
74
|
|
75
75
|
result = instance.pretty_print
|
76
|
-
result.must_equal expected
|
76
|
+
_(result).must_equal expected
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "test_helper"
|
4
4
|
describe GirFFI::PrettyPrinter do
|
5
|
-
describe
|
5
|
+
describe "#pretty_print" do
|
6
6
|
let(:instance) { GirFFI::PrettyPrinter.new }
|
7
|
-
it
|
8
|
-
instance.pretty_print
|
7
|
+
it "pretty-prints a module without version specification" do
|
8
|
+
instance.pretty_print "GObject"
|
9
9
|
pass
|
10
10
|
end
|
11
11
|
end
|
@@ -19,13 +19,13 @@ module GLib
|
|
19
19
|
self
|
20
20
|
end
|
21
21
|
def data
|
22
|
-
_v1 =
|
22
|
+
_v1 = @struct.to_ptr
|
23
23
|
_v2 = _v1.get_pointer(0)
|
24
24
|
_v3 = _v2.to_utf8
|
25
25
|
_v3
|
26
26
|
end
|
27
27
|
def data=(value)
|
28
|
-
_v1 =
|
28
|
+
_v1 = @struct.to_ptr
|
29
29
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
30
30
|
_v1.put_pointer(0, _v2)
|
31
31
|
end
|
@@ -35,18 +35,27 @@ module GLib
|
|
35
35
|
def get_element_size
|
36
36
|
Lib.g_array_get_element_size(self)
|
37
37
|
end
|
38
|
+
# Re-implementation of the g_array_index macro
|
39
|
+
def index(idx)
|
40
|
+
unless (0...length).cover?(idx) then
|
41
|
+
raise(IndexError, "Index #{idx} outside of bounds 0..#{(length - 1)}")
|
42
|
+
end
|
43
|
+
item_ptr = (data_ptr + (idx * element_size))
|
44
|
+
convertor = GirFFI::ArrayElementConvertor.new(element_type, item_ptr)
|
45
|
+
convertor.to_ruby_value
|
46
|
+
end
|
38
47
|
def len
|
39
|
-
_v1 =
|
40
|
-
_v2 = _v1.get_uint32(
|
48
|
+
_v1 = @struct.to_ptr
|
49
|
+
_v2 = _v1.get_uint32(8)
|
41
50
|
_v2
|
42
51
|
end
|
43
52
|
def len=(value)
|
44
|
-
_v1 =
|
53
|
+
_v1 = @struct.to_ptr
|
45
54
|
_v2 = value
|
46
|
-
_v1.put_uint32(
|
55
|
+
_v1.put_uint32(8, _v2)
|
47
56
|
end
|
48
57
|
def length
|
49
|
-
|
58
|
+
struct[:len]
|
50
59
|
end
|
51
60
|
# @api private
|
52
61
|
def reset_typespec(typespec = nil)
|
@@ -429,6 +438,19 @@ module GLib
|
|
429
438
|
GirFFI::ArgHelper.check_error(_v2)
|
430
439
|
return _v3
|
431
440
|
end
|
441
|
+
alias_method 'added', 'get_added'
|
442
|
+
alias_method 'app_info', 'get_app_info'
|
443
|
+
alias_method 'applications', 'get_applications'
|
444
|
+
alias_method 'description', 'get_description'
|
445
|
+
alias_method 'groups', 'get_groups'
|
446
|
+
alias_method 'icon', 'get_icon'
|
447
|
+
alias_method 'is_private', 'get_is_private'
|
448
|
+
alias_method 'mime_type', 'get_mime_type'
|
449
|
+
alias_method 'modified', 'get_modified'
|
450
|
+
alias_method 'size', 'get_size'
|
451
|
+
alias_method 'title', 'get_title'
|
452
|
+
alias_method 'uris', 'get_uris'
|
453
|
+
alias_method 'visited', 'get_visited'
|
432
454
|
end
|
433
455
|
# XXX: Don't know how to print enum
|
434
456
|
class GLib::ByteArray < GirFFI::BoxedBase
|
@@ -444,6 +466,14 @@ module GLib
|
|
444
466
|
_v3 = GLib::Bytes.wrap_own(_v2)
|
445
467
|
return _v3
|
446
468
|
end
|
469
|
+
def self.from(data)
|
470
|
+
case data
|
471
|
+
when self then
|
472
|
+
data
|
473
|
+
else
|
474
|
+
new.append(data)
|
475
|
+
end
|
476
|
+
end
|
447
477
|
def self.new
|
448
478
|
_v1 = GLib::Lib.g_byte_array_new
|
449
479
|
_v2 = GLib::ByteArray.wrap(_v1)
|
@@ -467,24 +497,24 @@ module GLib
|
|
467
497
|
self.class.wrap(Lib.g_byte_array_append(to_ptr, bytes, len))
|
468
498
|
end
|
469
499
|
def data
|
470
|
-
_v1 =
|
500
|
+
_v1 = @struct.to_ptr
|
471
501
|
_v2 = _v1.get_pointer(0)
|
472
502
|
_v2
|
473
503
|
end
|
474
504
|
def data=(value)
|
475
|
-
_v1 =
|
505
|
+
_v1 = @struct.to_ptr
|
476
506
|
_v2 = value
|
477
507
|
_v1.put_pointer(0, _v2)
|
478
508
|
end
|
479
509
|
def len
|
480
|
-
_v1 =
|
481
|
-
_v2 = _v1.get_uint32(
|
510
|
+
_v1 = @struct.to_ptr
|
511
|
+
_v2 = _v1.get_uint32(8)
|
482
512
|
_v2
|
483
513
|
end
|
484
514
|
def len=(value)
|
485
|
-
_v1 =
|
515
|
+
_v1 = @struct.to_ptr
|
486
516
|
_v2 = value
|
487
|
-
_v1.put_uint32(
|
517
|
+
_v1.put_uint32(8, _v2)
|
488
518
|
end
|
489
519
|
def to_string
|
490
520
|
data.read_string(len)
|
@@ -566,17 +596,18 @@ module GLib
|
|
566
596
|
GLib::Lib.g_bytes_unref(self)
|
567
597
|
end
|
568
598
|
def unref_to_array
|
569
|
-
_v1 = GLib::Lib.g_bytes_unref_to_array(self
|
599
|
+
_v1 = GLib::Lib.g_bytes_unref_to_array(self)
|
570
600
|
_v2 = GLib::ByteArray.wrap(_v1)
|
571
601
|
return _v2
|
572
602
|
end
|
573
603
|
def unref_to_data
|
574
604
|
_v1 = FFI::MemoryPointer.new(:uint64)
|
575
|
-
_v2 = GLib::Lib.g_bytes_unref_to_data(self
|
605
|
+
_v2 = GLib::Lib.g_bytes_unref_to_data(self, _v1)
|
576
606
|
_v3 = _v1.get_uint64(0)
|
577
607
|
_v4 = GirFFI::SizedArray.wrap(:guint8, _v3, _v2)
|
578
608
|
return _v4
|
579
609
|
end
|
610
|
+
alias_method 'size', 'get_size'
|
580
611
|
end
|
581
612
|
CSET_A_2_Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
582
613
|
CSET_DIGITS = "0123456789"
|
@@ -614,6 +645,7 @@ module GLib
|
|
614
645
|
_v2 = GirFFI::SizedArray.from(:guint8, -1, data)
|
615
646
|
GLib::Lib.g_checksum_update(self, _v2, _v1)
|
616
647
|
end
|
648
|
+
alias_method 'string', 'get_string'
|
617
649
|
end
|
618
650
|
# XXX: Don't know how to print enum
|
619
651
|
# XXX: Don't know how to print callback
|
@@ -629,8 +661,8 @@ module GLib
|
|
629
661
|
GLib::Lib.g_cond_clear(self)
|
630
662
|
end
|
631
663
|
def i
|
632
|
-
_v1 =
|
633
|
-
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1,
|
664
|
+
_v1 = @struct.to_ptr
|
665
|
+
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 8)
|
634
666
|
_v3 = GirFFI::SizedArray.wrap(:guint32, 2, _v2)
|
635
667
|
_v3
|
636
668
|
end
|
@@ -638,7 +670,7 @@ module GLib
|
|
638
670
|
GLib::Lib.g_cond_init(self)
|
639
671
|
end
|
640
672
|
def p
|
641
|
-
_v1 =
|
673
|
+
_v1 = @struct.to_ptr
|
642
674
|
_v2 = _v1.get_pointer(0)
|
643
675
|
_v2
|
644
676
|
end
|
@@ -780,14 +812,14 @@ module GLib
|
|
780
812
|
return _v2
|
781
813
|
end
|
782
814
|
def day
|
783
|
-
_v1 =
|
784
|
-
_v2 = _v1.get_uint32(
|
815
|
+
_v1 = @struct.to_ptr
|
816
|
+
_v2 = _v1.get_uint32(12)
|
785
817
|
_v2
|
786
818
|
end
|
787
819
|
def day=(value)
|
788
|
-
_v1 =
|
820
|
+
_v1 = @struct.to_ptr
|
789
821
|
_v2 = value
|
790
|
-
_v1.put_uint32(
|
822
|
+
_v1.put_uint32(12, _v2)
|
791
823
|
end
|
792
824
|
def days_between(date2)
|
793
825
|
_v1 = GLib::Date.from(date2)
|
@@ -795,14 +827,14 @@ module GLib
|
|
795
827
|
return _v2
|
796
828
|
end
|
797
829
|
def dmy
|
798
|
-
_v1 =
|
799
|
-
_v2 = _v1.get_uint32(
|
830
|
+
_v1 = @struct.to_ptr
|
831
|
+
_v2 = _v1.get_uint32(8)
|
800
832
|
_v2
|
801
833
|
end
|
802
834
|
def dmy=(value)
|
803
|
-
_v1 =
|
835
|
+
_v1 = @struct.to_ptr
|
804
836
|
_v2 = value
|
805
|
-
_v1.put_uint32(
|
837
|
+
_v1.put_uint32(8, _v2)
|
806
838
|
end
|
807
839
|
def free
|
808
840
|
GLib::Lib.g_date_free(self)
|
@@ -866,34 +898,34 @@ module GLib
|
|
866
898
|
return _v1
|
867
899
|
end
|
868
900
|
def julian
|
869
|
-
_v1 =
|
870
|
-
_v2 = _v1.get_uint32(
|
901
|
+
_v1 = @struct.to_ptr
|
902
|
+
_v2 = _v1.get_uint32(4)
|
871
903
|
_v2
|
872
904
|
end
|
873
905
|
def julian=(value)
|
874
|
-
_v1 =
|
906
|
+
_v1 = @struct.to_ptr
|
875
907
|
_v2 = value
|
876
|
-
_v1.put_uint32(
|
908
|
+
_v1.put_uint32(4, _v2)
|
877
909
|
end
|
878
910
|
def julian_days
|
879
|
-
_v1 =
|
911
|
+
_v1 = @struct.to_ptr
|
880
912
|
_v2 = _v1.get_uint32(0)
|
881
913
|
_v2
|
882
914
|
end
|
883
915
|
def julian_days=(value)
|
884
|
-
_v1 =
|
916
|
+
_v1 = @struct.to_ptr
|
885
917
|
_v2 = value
|
886
918
|
_v1.put_uint32(0, _v2)
|
887
919
|
end
|
888
920
|
def month
|
889
|
-
_v1 =
|
890
|
-
_v2 = _v1.get_uint32(
|
921
|
+
_v1 = @struct.to_ptr
|
922
|
+
_v2 = _v1.get_uint32(16)
|
891
923
|
_v2
|
892
924
|
end
|
893
925
|
def month=(value)
|
894
|
-
_v1 =
|
926
|
+
_v1 = @struct.to_ptr
|
895
927
|
_v2 = value
|
896
|
-
_v1.put_uint32(
|
928
|
+
_v1.put_uint32(16, _v2)
|
897
929
|
end
|
898
930
|
def order(date2)
|
899
931
|
_v1 = GLib::Date.from(date2)
|
@@ -958,15 +990,24 @@ module GLib
|
|
958
990
|
return _v1
|
959
991
|
end
|
960
992
|
def year
|
961
|
-
_v1 =
|
962
|
-
_v2 = _v1.get_uint32(
|
993
|
+
_v1 = @struct.to_ptr
|
994
|
+
_v2 = _v1.get_uint32(20)
|
963
995
|
_v2
|
964
996
|
end
|
965
997
|
def year=(value)
|
966
|
-
_v1 =
|
998
|
+
_v1 = @struct.to_ptr
|
967
999
|
_v2 = value
|
968
|
-
_v1.put_uint32(
|
969
|
-
end
|
1000
|
+
_v1.put_uint32(20, _v2)
|
1001
|
+
end
|
1002
|
+
alias_method 'day_of_year', 'get_day_of_year'
|
1003
|
+
alias_method 'iso8601_week_of_year', 'get_iso8601_week_of_year'
|
1004
|
+
alias_method 'monday_week_of_year', 'get_monday_week_of_year'
|
1005
|
+
alias_method 'parse=', 'set_parse'
|
1006
|
+
alias_method 'sunday_week_of_year', 'get_sunday_week_of_year'
|
1007
|
+
alias_method 'time=', 'set_time'
|
1008
|
+
alias_method 'time_t=', 'set_time_t'
|
1009
|
+
alias_method 'time_val=', 'set_time_val'
|
1010
|
+
alias_method 'weekday', 'get_weekday'
|
970
1011
|
end
|
971
1012
|
# XXX: Don't know how to print enum
|
972
1013
|
# XXX: Don't know how to print enum
|
@@ -1301,30 +1342,46 @@ module GLib
|
|
1301
1342
|
def unref
|
1302
1343
|
GLib::Lib.g_date_time_unref(self)
|
1303
1344
|
end
|
1345
|
+
alias_method 'day_of_month', 'get_day_of_month'
|
1346
|
+
alias_method 'day_of_week', 'get_day_of_week'
|
1347
|
+
alias_method 'day_of_year', 'get_day_of_year'
|
1348
|
+
alias_method 'hour', 'get_hour'
|
1349
|
+
alias_method 'microsecond', 'get_microsecond'
|
1350
|
+
alias_method 'minute', 'get_minute'
|
1351
|
+
alias_method 'month', 'get_month'
|
1352
|
+
alias_method 'second', 'get_second'
|
1353
|
+
alias_method 'seconds', 'get_seconds'
|
1354
|
+
alias_method 'timezone', 'get_timezone'
|
1355
|
+
alias_method 'timezone_abbreviation', 'get_timezone_abbreviation'
|
1356
|
+
alias_method 'utc_offset', 'get_utc_offset'
|
1357
|
+
alias_method 'week_numbering_year', 'get_week_numbering_year'
|
1358
|
+
alias_method 'week_of_year', 'get_week_of_year'
|
1359
|
+
alias_method 'year', 'get_year'
|
1360
|
+
alias_method 'ymd', 'get_ymd'
|
1304
1361
|
end
|
1305
1362
|
# XXX: Don't know how to print enum
|
1306
1363
|
class GLib::DebugKey < GirFFI::StructBase
|
1307
1364
|
|
1308
1365
|
def key
|
1309
|
-
_v1 =
|
1366
|
+
_v1 = @struct.to_ptr
|
1310
1367
|
_v2 = _v1.get_pointer(0)
|
1311
1368
|
_v3 = _v2.to_utf8
|
1312
1369
|
_v3
|
1313
1370
|
end
|
1314
1371
|
def key=(value)
|
1315
|
-
_v1 =
|
1372
|
+
_v1 = @struct.to_ptr
|
1316
1373
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
1317
1374
|
_v1.put_pointer(0, _v2)
|
1318
1375
|
end
|
1319
1376
|
def value
|
1320
|
-
_v1 =
|
1321
|
-
_v2 = _v1.get_uint32(
|
1377
|
+
_v1 = @struct.to_ptr
|
1378
|
+
_v2 = _v1.get_uint32(8)
|
1322
1379
|
_v2
|
1323
1380
|
end
|
1324
1381
|
def value=(value)
|
1325
|
-
_v1 =
|
1382
|
+
_v1 = @struct.to_ptr
|
1326
1383
|
_v2 = value
|
1327
|
-
_v1.put_uint32(
|
1384
|
+
_v1.put_uint32(8, _v2)
|
1328
1385
|
end
|
1329
1386
|
end
|
1330
1387
|
# XXX: Don't know how to print callback
|
@@ -1367,14 +1424,14 @@ module GLib
|
|
1367
1424
|
obj
|
1368
1425
|
end
|
1369
1426
|
def code
|
1370
|
-
_v1 =
|
1371
|
-
_v2 = _v1.get_int32(
|
1427
|
+
_v1 = @struct.to_ptr
|
1428
|
+
_v2 = _v1.get_int32(4)
|
1372
1429
|
_v2
|
1373
1430
|
end
|
1374
1431
|
def code=(value)
|
1375
|
-
_v1 =
|
1432
|
+
_v1 = @struct.to_ptr
|
1376
1433
|
_v2 = value
|
1377
|
-
_v1.put_int32(
|
1434
|
+
_v1.put_int32(4, _v2)
|
1378
1435
|
end
|
1379
1436
|
def copy
|
1380
1437
|
_v1 = GLib::Lib.g_error_copy(self)
|
@@ -1382,12 +1439,12 @@ module GLib
|
|
1382
1439
|
return _v2
|
1383
1440
|
end
|
1384
1441
|
def domain
|
1385
|
-
_v1 =
|
1442
|
+
_v1 = @struct.to_ptr
|
1386
1443
|
_v2 = _v1.get_uint32(0)
|
1387
1444
|
_v2
|
1388
1445
|
end
|
1389
1446
|
def domain=(value)
|
1390
|
-
_v1 =
|
1447
|
+
_v1 = @struct.to_ptr
|
1391
1448
|
_v2 = value
|
1392
1449
|
_v1.put_uint32(0, _v2)
|
1393
1450
|
end
|
@@ -1408,15 +1465,15 @@ module GLib
|
|
1408
1465
|
return _v3
|
1409
1466
|
end
|
1410
1467
|
def message
|
1411
|
-
_v1 =
|
1412
|
-
_v2 = _v1.get_pointer(
|
1468
|
+
_v1 = @struct.to_ptr
|
1469
|
+
_v2 = _v1.get_pointer(8)
|
1413
1470
|
_v3 = _v2.to_utf8
|
1414
1471
|
_v3
|
1415
1472
|
end
|
1416
1473
|
def message=(value)
|
1417
|
-
_v1 =
|
1474
|
+
_v1 = @struct.to_ptr
|
1418
1475
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
1419
|
-
_v1.put_pointer(
|
1476
|
+
_v1.put_pointer(8, _v2)
|
1420
1477
|
end
|
1421
1478
|
end
|
1422
1479
|
# XXX: Don't know how to print enum
|
@@ -1571,33 +1628,33 @@ module GLib
|
|
1571
1628
|
class GLib::HashTableIter < GirFFI::StructBase
|
1572
1629
|
|
1573
1630
|
def dummy1
|
1574
|
-
_v1 =
|
1631
|
+
_v1 = @struct.to_ptr
|
1575
1632
|
_v2 = _v1.get_pointer(0)
|
1576
1633
|
_v2
|
1577
1634
|
end
|
1578
1635
|
def dummy2
|
1579
|
-
_v1 =
|
1580
|
-
_v2 = _v1.get_pointer(
|
1636
|
+
_v1 = @struct.to_ptr
|
1637
|
+
_v2 = _v1.get_pointer(8)
|
1581
1638
|
_v2
|
1582
1639
|
end
|
1583
1640
|
def dummy3
|
1584
|
-
_v1 =
|
1585
|
-
_v2 = _v1.get_pointer(
|
1641
|
+
_v1 = @struct.to_ptr
|
1642
|
+
_v2 = _v1.get_pointer(16)
|
1586
1643
|
_v2
|
1587
1644
|
end
|
1588
1645
|
def dummy4
|
1589
|
-
_v1 =
|
1590
|
-
_v2 = _v1.get_int32(
|
1646
|
+
_v1 = @struct.to_ptr
|
1647
|
+
_v2 = _v1.get_int32(24)
|
1591
1648
|
_v2
|
1592
1649
|
end
|
1593
1650
|
def dummy5
|
1594
|
-
_v1 =
|
1595
|
-
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1,
|
1651
|
+
_v1 = @struct.to_ptr
|
1652
|
+
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 28)
|
1596
1653
|
_v2
|
1597
1654
|
end
|
1598
1655
|
def dummy6
|
1599
|
-
_v1 =
|
1600
|
-
_v2 = _v1.get_pointer(
|
1656
|
+
_v1 = @struct.to_ptr
|
1657
|
+
_v2 = _v1.get_pointer(32)
|
1601
1658
|
_v2
|
1602
1659
|
end
|
1603
1660
|
def init(hash_table)
|
@@ -1647,6 +1704,8 @@ module GLib
|
|
1647
1704
|
_v2 = GirFFI::SizedArray.from(:guint8, -1, data)
|
1648
1705
|
GLib::Lib.g_hmac_update(self, _v2, _v1)
|
1649
1706
|
end
|
1707
|
+
alias_method 'digest', 'get_digest'
|
1708
|
+
alias_method 'string', 'get_string'
|
1650
1709
|
end
|
1651
1710
|
class GLib::Hook < GirFFI::StructBase
|
1652
1711
|
def self.destroy(hook_list, hook_id)
|
@@ -1687,86 +1746,86 @@ module GLib
|
|
1687
1746
|
return _v2
|
1688
1747
|
end
|
1689
1748
|
def data
|
1690
|
-
_v1 =
|
1749
|
+
_v1 = @struct.to_ptr
|
1691
1750
|
_v2 = _v1.get_pointer(0)
|
1692
1751
|
_v2
|
1693
1752
|
end
|
1694
1753
|
def data=(value)
|
1695
|
-
_v1 =
|
1754
|
+
_v1 = @struct.to_ptr
|
1696
1755
|
_v2 = value
|
1697
1756
|
_v1.put_pointer(0, _v2)
|
1698
1757
|
end
|
1699
1758
|
def destroy
|
1700
|
-
_v1 =
|
1701
|
-
_v2 = GLib::DestroyNotify.get_value_from_pointer(_v1,
|
1759
|
+
_v1 = @struct.to_ptr
|
1760
|
+
_v2 = GLib::DestroyNotify.get_value_from_pointer(_v1, 56)
|
1702
1761
|
_v2
|
1703
1762
|
end
|
1704
1763
|
def destroy=(value)
|
1705
|
-
_v1 =
|
1764
|
+
_v1 = @struct.to_ptr
|
1706
1765
|
_v2 = GLib::DestroyNotify.from(value)
|
1707
|
-
GLib::DestroyNotify.copy_value_to_pointer(_v2, _v1)
|
1766
|
+
GLib::DestroyNotify.copy_value_to_pointer(_v2, _v1, 56)
|
1708
1767
|
end
|
1709
1768
|
def flags
|
1710
|
-
_v1 =
|
1711
|
-
_v2 = _v1.get_uint32(
|
1769
|
+
_v1 = @struct.to_ptr
|
1770
|
+
_v2 = _v1.get_uint32(40)
|
1712
1771
|
_v2
|
1713
1772
|
end
|
1714
1773
|
def flags=(value)
|
1715
|
-
_v1 =
|
1774
|
+
_v1 = @struct.to_ptr
|
1716
1775
|
_v2 = value
|
1717
|
-
_v1.put_uint32(
|
1776
|
+
_v1.put_uint32(40, _v2)
|
1718
1777
|
end
|
1719
1778
|
def func
|
1720
|
-
_v1 =
|
1721
|
-
_v2 = _v1.get_pointer(
|
1779
|
+
_v1 = @struct.to_ptr
|
1780
|
+
_v2 = _v1.get_pointer(48)
|
1722
1781
|
_v2
|
1723
1782
|
end
|
1724
1783
|
def func=(value)
|
1725
|
-
_v1 =
|
1784
|
+
_v1 = @struct.to_ptr
|
1726
1785
|
_v2 = value
|
1727
|
-
_v1.put_pointer(
|
1786
|
+
_v1.put_pointer(48, _v2)
|
1728
1787
|
end
|
1729
1788
|
def hook_id
|
1730
|
-
_v1 =
|
1731
|
-
_v2 = _v1.get_uint64(
|
1789
|
+
_v1 = @struct.to_ptr
|
1790
|
+
_v2 = _v1.get_uint64(32)
|
1732
1791
|
_v2
|
1733
1792
|
end
|
1734
1793
|
def hook_id=(value)
|
1735
|
-
_v1 =
|
1794
|
+
_v1 = @struct.to_ptr
|
1736
1795
|
_v2 = value
|
1737
|
-
_v1.put_uint64(
|
1796
|
+
_v1.put_uint64(32, _v2)
|
1738
1797
|
end
|
1739
1798
|
def next
|
1740
|
-
_v1 =
|
1741
|
-
_v2 = _v1.get_pointer(
|
1799
|
+
_v1 = @struct.to_ptr
|
1800
|
+
_v2 = _v1.get_pointer(8)
|
1742
1801
|
_v3 = GLib::Hook.wrap(_v2)
|
1743
1802
|
_v3
|
1744
1803
|
end
|
1745
1804
|
def next=(value)
|
1746
|
-
_v1 =
|
1805
|
+
_v1 = @struct.to_ptr
|
1747
1806
|
_v2 = GLib::Hook.copy_from(value)
|
1748
|
-
_v1.put_pointer(
|
1807
|
+
_v1.put_pointer(8, _v2)
|
1749
1808
|
end
|
1750
1809
|
def prev
|
1751
|
-
_v1 =
|
1752
|
-
_v2 = _v1.get_pointer(
|
1810
|
+
_v1 = @struct.to_ptr
|
1811
|
+
_v2 = _v1.get_pointer(16)
|
1753
1812
|
_v3 = GLib::Hook.wrap(_v2)
|
1754
1813
|
_v3
|
1755
1814
|
end
|
1756
1815
|
def prev=(value)
|
1757
|
-
_v1 =
|
1816
|
+
_v1 = @struct.to_ptr
|
1758
1817
|
_v2 = GLib::Hook.copy_from(value)
|
1759
|
-
_v1.put_pointer(
|
1818
|
+
_v1.put_pointer(16, _v2)
|
1760
1819
|
end
|
1761
1820
|
def ref_count
|
1762
|
-
_v1 =
|
1763
|
-
_v2 = _v1.get_uint32(
|
1821
|
+
_v1 = @struct.to_ptr
|
1822
|
+
_v2 = _v1.get_uint32(24)
|
1764
1823
|
_v2
|
1765
1824
|
end
|
1766
1825
|
def ref_count=(value)
|
1767
|
-
_v1 =
|
1826
|
+
_v1 = @struct.to_ptr
|
1768
1827
|
_v2 = value
|
1769
|
-
_v1.put_uint32(
|
1828
|
+
_v1.put_uint32(24, _v2)
|
1770
1829
|
end
|
1771
1830
|
end
|
1772
1831
|
# XXX: Don't know how to print callback
|
@@ -1782,57 +1841,57 @@ module GLib
|
|
1782
1841
|
GLib::Lib.g_hook_list_clear(self)
|
1783
1842
|
end
|
1784
1843
|
def dummy
|
1785
|
-
_v1 =
|
1786
|
-
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1,
|
1844
|
+
_v1 = @struct.to_ptr
|
1845
|
+
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 40)
|
1787
1846
|
_v3 = GirFFI::SizedArray.wrap([:pointer, :void], 2, _v2)
|
1788
1847
|
_v3
|
1789
1848
|
end
|
1790
1849
|
def dummy3
|
1791
|
-
_v1 =
|
1792
|
-
_v2 = _v1.get_pointer(
|
1850
|
+
_v1 = @struct.to_ptr
|
1851
|
+
_v2 = _v1.get_pointer(24)
|
1793
1852
|
_v2
|
1794
1853
|
end
|
1795
1854
|
def dummy3=(value)
|
1796
|
-
_v1 =
|
1855
|
+
_v1 = @struct.to_ptr
|
1797
1856
|
_v2 = value
|
1798
|
-
_v1.put_pointer(
|
1857
|
+
_v1.put_pointer(24, _v2)
|
1799
1858
|
end
|
1800
1859
|
def dummy=(value)
|
1801
|
-
_v1 =
|
1860
|
+
_v1 = @struct.to_ptr
|
1802
1861
|
GirFFI::ArgHelper.check_fixed_array_size(2, value, "value")
|
1803
1862
|
_v2 = GirFFI::SizedArray.copy_from([:pointer, :void], 2, value)
|
1804
|
-
GirFFI::SizedArray.copy_value_to_pointer(_v2, _v1)
|
1863
|
+
GirFFI::SizedArray.copy_value_to_pointer(_v2, _v1, 40)
|
1805
1864
|
end
|
1806
1865
|
def finalize_hook
|
1807
|
-
_v1 =
|
1808
|
-
_v2 = GLib::HookFinalizeFunc.get_value_from_pointer(_v1,
|
1866
|
+
_v1 = @struct.to_ptr
|
1867
|
+
_v2 = GLib::HookFinalizeFunc.get_value_from_pointer(_v1, 32)
|
1809
1868
|
_v2
|
1810
1869
|
end
|
1811
1870
|
def finalize_hook=(value)
|
1812
|
-
_v1 =
|
1871
|
+
_v1 = @struct.to_ptr
|
1813
1872
|
_v2 = GLib::HookFinalizeFunc.from(value)
|
1814
|
-
GLib::HookFinalizeFunc.copy_value_to_pointer(_v2, _v1)
|
1873
|
+
GLib::HookFinalizeFunc.copy_value_to_pointer(_v2, _v1, 32)
|
1815
1874
|
end
|
1816
1875
|
def hook_size
|
1817
|
-
_v1 =
|
1818
|
-
_v2 = _v1.get_uint32(
|
1876
|
+
_v1 = @struct.to_ptr
|
1877
|
+
_v2 = _v1.get_uint32(8)
|
1819
1878
|
_v2
|
1820
1879
|
end
|
1821
1880
|
def hook_size=(value)
|
1822
|
-
_v1 =
|
1881
|
+
_v1 = @struct.to_ptr
|
1823
1882
|
_v2 = value
|
1824
|
-
_v1.put_uint32(
|
1883
|
+
_v1.put_uint32(8, _v2)
|
1825
1884
|
end
|
1826
1885
|
def hooks
|
1827
|
-
_v1 =
|
1828
|
-
_v2 = _v1.get_pointer(
|
1886
|
+
_v1 = @struct.to_ptr
|
1887
|
+
_v2 = _v1.get_pointer(16)
|
1829
1888
|
_v3 = GLib::Hook.wrap(_v2)
|
1830
1889
|
_v3
|
1831
1890
|
end
|
1832
1891
|
def hooks=(value)
|
1833
|
-
_v1 =
|
1892
|
+
_v1 = @struct.to_ptr
|
1834
1893
|
_v2 = GLib::Hook.copy_from(value)
|
1835
|
-
_v1.put_pointer(
|
1894
|
+
_v1.put_pointer(16, _v2)
|
1836
1895
|
end
|
1837
1896
|
def init(hook_size)
|
1838
1897
|
_v1 = hook_size
|
@@ -1847,22 +1906,22 @@ module GLib
|
|
1847
1906
|
GLib::Lib.g_hook_list_invoke_check(self, _v1)
|
1848
1907
|
end
|
1849
1908
|
def is_setup
|
1850
|
-
_v1 =
|
1851
|
-
_v2 = _v1.get_uint32(
|
1909
|
+
_v1 = @struct.to_ptr
|
1910
|
+
_v2 = _v1.get_uint32(12)
|
1852
1911
|
_v2
|
1853
1912
|
end
|
1854
1913
|
def is_setup=(value)
|
1855
|
-
_v1 =
|
1914
|
+
_v1 = @struct.to_ptr
|
1856
1915
|
_v2 = value
|
1857
|
-
_v1.put_uint32(
|
1916
|
+
_v1.put_uint32(12, _v2)
|
1858
1917
|
end
|
1859
1918
|
def seq_id
|
1860
|
-
_v1 =
|
1919
|
+
_v1 = @struct.to_ptr
|
1861
1920
|
_v2 = _v1.get_uint64(0)
|
1862
1921
|
_v2
|
1863
1922
|
end
|
1864
1923
|
def seq_id=(value)
|
1865
|
-
_v1 =
|
1924
|
+
_v1 = @struct.to_ptr
|
1866
1925
|
_v2 = value
|
1867
1926
|
_v1.put_uint64(0, _v2)
|
1868
1927
|
end
|
@@ -1893,32 +1952,32 @@ module GLib
|
|
1893
1952
|
obj
|
1894
1953
|
end
|
1895
1954
|
def buf_size
|
1896
|
-
_v1 =
|
1897
|
-
_v2 = _v1.get_uint64(
|
1955
|
+
_v1 = @struct.to_ptr
|
1956
|
+
_v2 = _v1.get_uint64(56)
|
1898
1957
|
_v2
|
1899
1958
|
end
|
1900
1959
|
def close
|
1901
1960
|
GLib::Lib.g_io_channel_close(self)
|
1902
1961
|
end
|
1903
1962
|
def close_on_unref
|
1904
|
-
_v1 =
|
1905
|
-
_v2 = _v1.get_uint32(
|
1963
|
+
_v1 = @struct.to_ptr
|
1964
|
+
_v2 = _v1.get_uint32(104)
|
1906
1965
|
_v2
|
1907
1966
|
end
|
1908
1967
|
def do_encode
|
1909
|
-
_v1 =
|
1910
|
-
_v2 = _v1.get_uint32(
|
1968
|
+
_v1 = @struct.to_ptr
|
1969
|
+
_v2 = _v1.get_uint32(100)
|
1911
1970
|
_v2
|
1912
1971
|
end
|
1913
1972
|
def encoded_read_buf
|
1914
|
-
_v1 =
|
1915
|
-
_v2 = _v1.get_pointer(
|
1973
|
+
_v1 = @struct.to_ptr
|
1974
|
+
_v2 = _v1.get_pointer(72)
|
1916
1975
|
_v3 = GLib::String.wrap(_v2)
|
1917
1976
|
_v3
|
1918
1977
|
end
|
1919
1978
|
def encoding
|
1920
|
-
_v1 =
|
1921
|
-
_v2 = _v1.get_pointer(
|
1979
|
+
_v1 = @struct.to_ptr
|
1980
|
+
_v2 = _v1.get_pointer(16)
|
1922
1981
|
_v3 = _v2.to_utf8
|
1923
1982
|
_v3
|
1924
1983
|
end
|
@@ -1929,8 +1988,8 @@ module GLib
|
|
1929
1988
|
return _v2
|
1930
1989
|
end
|
1931
1990
|
def funcs
|
1932
|
-
_v1 =
|
1933
|
-
_v2 = _v1.get_pointer(
|
1991
|
+
_v1 = @struct.to_ptr
|
1992
|
+
_v2 = _v1.get_pointer(8)
|
1934
1993
|
_v3 = GLib::IOFuncs.wrap(_v2)
|
1935
1994
|
_v3
|
1936
1995
|
end
|
@@ -1978,34 +2037,34 @@ module GLib
|
|
1978
2037
|
@struct.owned = true
|
1979
2038
|
end
|
1980
2039
|
def is_readable
|
1981
|
-
_v1 =
|
1982
|
-
_v2 = _v1.get_uint32(
|
2040
|
+
_v1 = @struct.to_ptr
|
2041
|
+
_v2 = _v1.get_uint32(108)
|
1983
2042
|
_v2
|
1984
2043
|
end
|
1985
2044
|
def is_seekable
|
1986
|
-
_v1 =
|
1987
|
-
_v2 = _v1.get_uint32(
|
2045
|
+
_v1 = @struct.to_ptr
|
2046
|
+
_v2 = _v1.get_uint32(116)
|
1988
2047
|
_v2
|
1989
2048
|
end
|
1990
2049
|
def is_writeable
|
1991
|
-
_v1 =
|
1992
|
-
_v2 = _v1.get_uint32(
|
2050
|
+
_v1 = @struct.to_ptr
|
2051
|
+
_v2 = _v1.get_uint32(112)
|
1993
2052
|
_v2
|
1994
2053
|
end
|
1995
2054
|
def line_term
|
1996
|
-
_v1 =
|
1997
|
-
_v2 = _v1.get_pointer(
|
2055
|
+
_v1 = @struct.to_ptr
|
2056
|
+
_v2 = _v1.get_pointer(40)
|
1998
2057
|
_v3 = _v2.to_utf8
|
1999
2058
|
_v3
|
2000
2059
|
end
|
2001
2060
|
def line_term_len
|
2002
|
-
_v1 =
|
2003
|
-
_v2 = _v1.get_uint32(
|
2061
|
+
_v1 = @struct.to_ptr
|
2062
|
+
_v2 = _v1.get_uint32(48)
|
2004
2063
|
_v2
|
2005
2064
|
end
|
2006
2065
|
def partial_write_buf
|
2007
|
-
_v1 =
|
2008
|
-
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1,
|
2066
|
+
_v1 = @struct.to_ptr
|
2067
|
+
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 88)
|
2009
2068
|
_v3 = GirFFI::SizedArray.wrap(:gint8, 6, _v2)
|
2010
2069
|
_v3
|
2011
2070
|
end
|
@@ -2017,14 +2076,14 @@ module GLib
|
|
2017
2076
|
return _v4
|
2018
2077
|
end
|
2019
2078
|
def read_buf
|
2020
|
-
_v1 =
|
2021
|
-
_v2 = _v1.get_pointer(
|
2079
|
+
_v1 = @struct.to_ptr
|
2080
|
+
_v2 = _v1.get_pointer(64)
|
2022
2081
|
_v3 = GLib::String.wrap(_v2)
|
2023
2082
|
_v3
|
2024
2083
|
end
|
2025
2084
|
def read_cd
|
2026
|
-
_v1 =
|
2027
|
-
_v2 = _v1.get_pointer(
|
2085
|
+
_v1 = @struct.to_ptr
|
2086
|
+
_v2 = _v1.get_pointer(24)
|
2028
2087
|
_v2
|
2029
2088
|
end
|
2030
2089
|
def read_chars
|
@@ -2083,18 +2142,18 @@ module GLib
|
|
2083
2142
|
return _v2
|
2084
2143
|
end
|
2085
2144
|
def ref_count
|
2086
|
-
_v1 =
|
2145
|
+
_v1 = @struct.to_ptr
|
2087
2146
|
_v2 = _v1.get_int32(0)
|
2088
2147
|
_v2
|
2089
2148
|
end
|
2090
2149
|
def reserved1
|
2091
|
-
_v1 =
|
2092
|
-
_v2 = _v1.get_pointer(
|
2150
|
+
_v1 = @struct.to_ptr
|
2151
|
+
_v2 = _v1.get_pointer(120)
|
2093
2152
|
_v2
|
2094
2153
|
end
|
2095
2154
|
def reserved2
|
2096
|
-
_v1 =
|
2097
|
-
_v2 = _v1.get_pointer(
|
2155
|
+
_v1 = @struct.to_ptr
|
2156
|
+
_v2 = _v1.get_pointer(128)
|
2098
2157
|
_v2
|
2099
2158
|
end
|
2100
2159
|
def seek(offset, type)
|
@@ -2163,8 +2222,8 @@ module GLib
|
|
2163
2222
|
GLib::Lib.g_io_channel_unref(self)
|
2164
2223
|
end
|
2165
2224
|
def use_buffer
|
2166
|
-
_v1 =
|
2167
|
-
_v2 = _v1.get_uint32(
|
2225
|
+
_v1 = @struct.to_ptr
|
2226
|
+
_v2 = _v1.get_uint32(96)
|
2168
2227
|
_v2
|
2169
2228
|
end
|
2170
2229
|
def write(buf, count, bytes_written)
|
@@ -2175,14 +2234,14 @@ module GLib
|
|
2175
2234
|
return _v4
|
2176
2235
|
end
|
2177
2236
|
def write_buf
|
2178
|
-
_v1 =
|
2179
|
-
_v2 = _v1.get_pointer(
|
2237
|
+
_v1 = @struct.to_ptr
|
2238
|
+
_v2 = _v1.get_pointer(80)
|
2180
2239
|
_v3 = GLib::String.wrap(_v2)
|
2181
2240
|
_v3
|
2182
2241
|
end
|
2183
2242
|
def write_cd
|
2184
|
-
_v1 =
|
2185
|
-
_v2 = _v1.get_pointer(
|
2243
|
+
_v1 = @struct.to_ptr
|
2244
|
+
_v2 = _v1.get_pointer(32)
|
2186
2245
|
_v2
|
2187
2246
|
end
|
2188
2247
|
def write_chars(buf, count)
|
@@ -2202,6 +2261,15 @@ module GLib
|
|
2202
2261
|
GirFFI::ArgHelper.check_error(_v2)
|
2203
2262
|
return _v3
|
2204
2263
|
end
|
2264
|
+
alias_method 'buffer_condition', 'get_buffer_condition'
|
2265
|
+
alias_method 'buffer_size', 'get_buffer_size'
|
2266
|
+
alias_method 'buffer_size=', 'set_buffer_size'
|
2267
|
+
alias_method 'buffered', 'get_buffered'
|
2268
|
+
alias_method 'buffered=', 'set_buffered'
|
2269
|
+
alias_method 'close_on_unref=', 'set_close_on_unref'
|
2270
|
+
alias_method 'encoding=', 'set_encoding'
|
2271
|
+
alias_method 'flags', 'get_flags'
|
2272
|
+
alias_method 'flags=', 'set_flags'
|
2205
2273
|
end
|
2206
2274
|
# XXX: Don't know how to print enum
|
2207
2275
|
# XXX: Don't know how to print flags
|
@@ -2211,43 +2279,43 @@ module GLib
|
|
2211
2279
|
class GLib::IOFuncs < GirFFI::StructBase
|
2212
2280
|
|
2213
2281
|
def io_close
|
2214
|
-
_v1 =
|
2215
|
-
_v2 = GLib::Io_close.get_value_from_pointer(_v1,
|
2282
|
+
_v1 = @struct.to_ptr
|
2283
|
+
_v2 = GLib::Io_close.get_value_from_pointer(_v1, 24)
|
2216
2284
|
_v2
|
2217
2285
|
end
|
2218
2286
|
def io_create_watch
|
2219
|
-
_v1 =
|
2220
|
-
_v2 = GLib::Io_create_watch.get_value_from_pointer(_v1,
|
2287
|
+
_v1 = @struct.to_ptr
|
2288
|
+
_v2 = GLib::Io_create_watch.get_value_from_pointer(_v1, 32)
|
2221
2289
|
_v2
|
2222
2290
|
end
|
2223
2291
|
def io_free
|
2224
|
-
_v1 =
|
2225
|
-
_v2 = GLib::Io_free.get_value_from_pointer(_v1,
|
2292
|
+
_v1 = @struct.to_ptr
|
2293
|
+
_v2 = GLib::Io_free.get_value_from_pointer(_v1, 40)
|
2226
2294
|
_v2
|
2227
2295
|
end
|
2228
2296
|
def io_get_flags
|
2229
|
-
_v1 =
|
2230
|
-
_v2 = GLib::Io_get_flags.get_value_from_pointer(_v1,
|
2297
|
+
_v1 = @struct.to_ptr
|
2298
|
+
_v2 = GLib::Io_get_flags.get_value_from_pointer(_v1, 56)
|
2231
2299
|
_v2
|
2232
2300
|
end
|
2233
2301
|
def io_read
|
2234
|
-
_v1 =
|
2302
|
+
_v1 = @struct.to_ptr
|
2235
2303
|
_v2 = GLib::Io_read.get_value_from_pointer(_v1, 0)
|
2236
2304
|
_v2
|
2237
2305
|
end
|
2238
2306
|
def io_seek
|
2239
|
-
_v1 =
|
2240
|
-
_v2 = GLib::Io_seek.get_value_from_pointer(_v1,
|
2307
|
+
_v1 = @struct.to_ptr
|
2308
|
+
_v2 = GLib::Io_seek.get_value_from_pointer(_v1, 16)
|
2241
2309
|
_v2
|
2242
2310
|
end
|
2243
2311
|
def io_set_flags
|
2244
|
-
_v1 =
|
2245
|
-
_v2 = GLib::Io_set_flags.get_value_from_pointer(_v1,
|
2312
|
+
_v1 = @struct.to_ptr
|
2313
|
+
_v2 = GLib::Io_set_flags.get_value_from_pointer(_v1, 48)
|
2246
2314
|
_v2
|
2247
2315
|
end
|
2248
2316
|
def io_write
|
2249
|
-
_v1 =
|
2250
|
-
_v2 = GLib::Io_write.get_value_from_pointer(_v1,
|
2317
|
+
_v1 = @struct.to_ptr
|
2318
|
+
_v2 = GLib::Io_write.get_value_from_pointer(_v1, 8)
|
2251
2319
|
_v2
|
2252
2320
|
end
|
2253
2321
|
end
|
@@ -2648,6 +2716,25 @@ module GLib
|
|
2648
2716
|
def unref
|
2649
2717
|
GLib::Lib.g_key_file_unref(self)
|
2650
2718
|
end
|
2719
|
+
alias_method 'boolean', 'get_boolean'
|
2720
|
+
alias_method 'boolean_list', 'get_boolean_list'
|
2721
|
+
alias_method 'comment', 'get_comment'
|
2722
|
+
alias_method 'double', 'get_double'
|
2723
|
+
alias_method 'double_list', 'get_double_list'
|
2724
|
+
alias_method 'groups', 'get_groups'
|
2725
|
+
alias_method 'int64', 'get_int64'
|
2726
|
+
alias_method 'integer', 'get_integer'
|
2727
|
+
alias_method 'integer_list', 'get_integer_list'
|
2728
|
+
alias_method 'keys', 'get_keys'
|
2729
|
+
alias_method 'list_separator=', 'set_list_separator'
|
2730
|
+
alias_method 'locale_for_key', 'get_locale_for_key'
|
2731
|
+
alias_method 'locale_string', 'get_locale_string'
|
2732
|
+
alias_method 'locale_string_list', 'get_locale_string_list'
|
2733
|
+
alias_method 'start_group', 'get_start_group'
|
2734
|
+
alias_method 'string', 'get_string'
|
2735
|
+
alias_method 'string_list', 'get_string_list'
|
2736
|
+
alias_method 'uint64', 'get_uint64'
|
2737
|
+
alias_method 'value', 'get_value'
|
2651
2738
|
end
|
2652
2739
|
# XXX: Don't know how to print enum
|
2653
2740
|
# XXX: Don't know how to print flags
|
@@ -2666,25 +2753,25 @@ module GLib
|
|
2666
2753
|
self.class.wrap(element_type, Lib.g_list_append(self, element_ptr_for(data)))
|
2667
2754
|
end
|
2668
2755
|
def data=(value)
|
2669
|
-
_v1 =
|
2756
|
+
_v1 = @struct.to_ptr
|
2670
2757
|
_v2 = value
|
2671
2758
|
_v1.put_pointer(0, _v2)
|
2672
2759
|
end
|
2673
2760
|
def next=(value)
|
2674
|
-
_v1 =
|
2761
|
+
_v1 = @struct.to_ptr
|
2675
2762
|
_v2 = GLib::List.from([:pointer, :void], value)
|
2676
|
-
_v1.put_pointer(
|
2763
|
+
_v1.put_pointer(8, _v2)
|
2677
2764
|
end
|
2678
2765
|
def prev
|
2679
|
-
_v1 =
|
2680
|
-
_v2 = _v1.get_pointer(
|
2766
|
+
_v1 = @struct.to_ptr
|
2767
|
+
_v2 = _v1.get_pointer(16)
|
2681
2768
|
_v3 = GLib::List.wrap([:pointer, :void], _v2)
|
2682
2769
|
_v3
|
2683
2770
|
end
|
2684
2771
|
def prev=(value)
|
2685
|
-
_v1 =
|
2772
|
+
_v1 = @struct.to_ptr
|
2686
2773
|
_v2 = GLib::List.from([:pointer, :void], value)
|
2687
|
-
_v1.put_pointer(
|
2774
|
+
_v1.put_pointer(16, _v2)
|
2688
2775
|
end
|
2689
2776
|
alias_method 'data', 'head'
|
2690
2777
|
alias_method 'next', 'tail'
|
@@ -2692,35 +2779,35 @@ module GLib
|
|
2692
2779
|
class GLib::LogField < GirFFI::StructBase
|
2693
2780
|
|
2694
2781
|
def key
|
2695
|
-
_v1 =
|
2782
|
+
_v1 = @struct.to_ptr
|
2696
2783
|
_v2 = _v1.get_pointer(0)
|
2697
2784
|
_v3 = _v2.to_utf8
|
2698
2785
|
_v3
|
2699
2786
|
end
|
2700
2787
|
def key=(value)
|
2701
|
-
_v1 =
|
2788
|
+
_v1 = @struct.to_ptr
|
2702
2789
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
2703
2790
|
_v1.put_pointer(0, _v2)
|
2704
2791
|
end
|
2705
2792
|
def length
|
2706
|
-
_v1 =
|
2707
|
-
_v2 = _v1.get_int64(
|
2793
|
+
_v1 = @struct.to_ptr
|
2794
|
+
_v2 = _v1.get_int64(16)
|
2708
2795
|
_v2
|
2709
2796
|
end
|
2710
2797
|
def length=(value)
|
2711
|
-
_v1 =
|
2798
|
+
_v1 = @struct.to_ptr
|
2712
2799
|
_v2 = value
|
2713
|
-
_v1.put_int64(
|
2800
|
+
_v1.put_int64(16, _v2)
|
2714
2801
|
end
|
2715
2802
|
def value
|
2716
|
-
_v1 =
|
2717
|
-
_v2 = _v1.get_pointer(
|
2803
|
+
_v1 = @struct.to_ptr
|
2804
|
+
_v2 = _v1.get_pointer(8)
|
2718
2805
|
_v2
|
2719
2806
|
end
|
2720
2807
|
def value=(value)
|
2721
|
-
_v1 =
|
2808
|
+
_v1 = @struct.to_ptr
|
2722
2809
|
_v2 = value
|
2723
|
-
_v1.put_pointer(
|
2810
|
+
_v1.put_pointer(8, _v2)
|
2724
2811
|
end
|
2725
2812
|
end
|
2726
2813
|
# XXX: Don't know how to print callback
|
@@ -2736,12 +2823,12 @@ module GLib
|
|
2736
2823
|
MAXUINT32 = 4294967295
|
2737
2824
|
MAXUINT64 = 18446744073709551615
|
2738
2825
|
MAXUINT8 = 255
|
2739
|
-
MICRO_VERSION =
|
2826
|
+
MICRO_VERSION = 6
|
2740
2827
|
MININT16 = -32768
|
2741
2828
|
MININT32 = -2147483648
|
2742
2829
|
MININT64 = -9223372036854775808
|
2743
2830
|
MININT8 = -128
|
2744
|
-
MINOR_VERSION =
|
2831
|
+
MINOR_VERSION = 60
|
2745
2832
|
MODULE_SUFFIX = "so"
|
2746
2833
|
class GLib::MainContext < GirFFI::BoxedBase
|
2747
2834
|
def self.default
|
@@ -2826,10 +2913,11 @@ module GLib
|
|
2826
2913
|
def pop_thread_default
|
2827
2914
|
GLib::Lib.g_main_context_pop_thread_default(self)
|
2828
2915
|
end
|
2829
|
-
def prepare
|
2830
|
-
_v1 =
|
2916
|
+
def prepare
|
2917
|
+
_v1 = FFI::MemoryPointer.new(:int32)
|
2831
2918
|
_v2 = GLib::Lib.g_main_context_prepare(self, _v1)
|
2832
|
-
|
2919
|
+
_v3 = _v1.get_int32(0)
|
2920
|
+
return [_v2, _v3]
|
2833
2921
|
end
|
2834
2922
|
def push_thread_default
|
2835
2923
|
GLib::Lib.g_main_context_push_thread_default(self)
|
@@ -2911,6 +2999,7 @@ module GLib
|
|
2911
2999
|
def unref
|
2912
3000
|
GLib::Lib.g_main_loop_unref(self)
|
2913
3001
|
end
|
3002
|
+
alias_method 'context', 'get_context'
|
2914
3003
|
alias_method 'run', 'run_with_thread_enabler'
|
2915
3004
|
alias_method 'run_without_thread_enabler', 'run'
|
2916
3005
|
end
|
@@ -2960,6 +3049,9 @@ module GLib
|
|
2960
3049
|
def unref
|
2961
3050
|
GLib::Lib.g_mapped_file_unref(self)
|
2962
3051
|
end
|
3052
|
+
alias_method 'bytes', 'get_bytes'
|
3053
|
+
alias_method 'contents', 'get_contents'
|
3054
|
+
alias_method 'length', 'get_length'
|
2963
3055
|
end
|
2964
3056
|
# XXX: Don't know how to print flags
|
2965
3057
|
# XXX: Don't know how to print enum
|
@@ -3017,33 +3109,36 @@ module GLib
|
|
3017
3109
|
def unref
|
3018
3110
|
GLib::Lib.g_markup_parse_context_unref(self)
|
3019
3111
|
end
|
3112
|
+
alias_method 'element', 'get_element'
|
3113
|
+
alias_method 'position', 'get_position'
|
3114
|
+
alias_method 'user_data', 'get_user_data'
|
3020
3115
|
end
|
3021
3116
|
# XXX: Don't know how to print flags
|
3022
3117
|
class GLib::MarkupParser < GirFFI::StructBase
|
3023
3118
|
|
3024
3119
|
def end_element
|
3025
|
-
_v1 =
|
3026
|
-
_v2 = GLib::End_element.get_value_from_pointer(_v1,
|
3120
|
+
_v1 = @struct.to_ptr
|
3121
|
+
_v2 = GLib::End_element.get_value_from_pointer(_v1, 8)
|
3027
3122
|
_v2
|
3028
3123
|
end
|
3029
3124
|
def error
|
3030
|
-
_v1 =
|
3031
|
-
_v2 = GLib::Error.get_value_from_pointer(_v1,
|
3125
|
+
_v1 = @struct.to_ptr
|
3126
|
+
_v2 = GLib::Error.get_value_from_pointer(_v1, 32)
|
3032
3127
|
_v2
|
3033
3128
|
end
|
3034
3129
|
def passthrough
|
3035
|
-
_v1 =
|
3036
|
-
_v2 = GLib::Passthrough.get_value_from_pointer(_v1,
|
3130
|
+
_v1 = @struct.to_ptr
|
3131
|
+
_v2 = GLib::Passthrough.get_value_from_pointer(_v1, 24)
|
3037
3132
|
_v2
|
3038
3133
|
end
|
3039
3134
|
def start_element
|
3040
|
-
_v1 =
|
3135
|
+
_v1 = @struct.to_ptr
|
3041
3136
|
_v2 = GLib::Start_element.get_value_from_pointer(_v1, 0)
|
3042
3137
|
_v2
|
3043
3138
|
end
|
3044
3139
|
def text
|
3045
|
-
_v1 =
|
3046
|
-
_v2 = GLib::Text.get_value_from_pointer(_v1,
|
3140
|
+
_v1 = @struct.to_ptr
|
3141
|
+
_v2 = GLib::Text.get_value_from_pointer(_v1, 16)
|
3047
3142
|
_v2
|
3048
3143
|
end
|
3049
3144
|
end
|
@@ -3131,37 +3226,40 @@ module GLib
|
|
3131
3226
|
def unref
|
3132
3227
|
GLib::Lib.g_match_info_unref(self)
|
3133
3228
|
end
|
3229
|
+
alias_method 'match_count', 'get_match_count'
|
3230
|
+
alias_method 'regex', 'get_regex'
|
3231
|
+
alias_method 'string', 'get_string'
|
3134
3232
|
end
|
3135
3233
|
class GLib::MemVTable < GirFFI::StructBase
|
3136
3234
|
|
3137
3235
|
def calloc
|
3138
|
-
_v1 =
|
3139
|
-
_v2 = GLib::Calloc.get_value_from_pointer(_v1,
|
3236
|
+
_v1 = @struct.to_ptr
|
3237
|
+
_v2 = GLib::Calloc.get_value_from_pointer(_v1, 24)
|
3140
3238
|
_v2
|
3141
3239
|
end
|
3142
3240
|
def free
|
3143
|
-
_v1 =
|
3144
|
-
_v2 = GLib::Free.get_value_from_pointer(_v1,
|
3241
|
+
_v1 = @struct.to_ptr
|
3242
|
+
_v2 = GLib::Free.get_value_from_pointer(_v1, 16)
|
3145
3243
|
_v2
|
3146
3244
|
end
|
3147
3245
|
def malloc
|
3148
|
-
_v1 =
|
3246
|
+
_v1 = @struct.to_ptr
|
3149
3247
|
_v2 = GLib::Malloc.get_value_from_pointer(_v1, 0)
|
3150
3248
|
_v2
|
3151
3249
|
end
|
3152
3250
|
def realloc
|
3153
|
-
_v1 =
|
3154
|
-
_v2 = GLib::Realloc.get_value_from_pointer(_v1,
|
3251
|
+
_v1 = @struct.to_ptr
|
3252
|
+
_v2 = GLib::Realloc.get_value_from_pointer(_v1, 8)
|
3155
3253
|
_v2
|
3156
3254
|
end
|
3157
3255
|
def try_malloc
|
3158
|
-
_v1 =
|
3159
|
-
_v2 = GLib::Try_malloc.get_value_from_pointer(_v1,
|
3256
|
+
_v1 = @struct.to_ptr
|
3257
|
+
_v2 = GLib::Try_malloc.get_value_from_pointer(_v1, 32)
|
3160
3258
|
_v2
|
3161
3259
|
end
|
3162
3260
|
def try_realloc
|
3163
|
-
_v1 =
|
3164
|
-
_v2 = GLib::Try_realloc.get_value_from_pointer(_v1,
|
3261
|
+
_v1 = @struct.to_ptr
|
3262
|
+
_v2 = GLib::Try_realloc.get_value_from_pointer(_v1, 40)
|
3165
3263
|
_v2
|
3166
3264
|
end
|
3167
3265
|
end
|
@@ -3179,23 +3277,23 @@ module GLib
|
|
3179
3277
|
return _v2
|
3180
3278
|
end
|
3181
3279
|
def children
|
3182
|
-
_v1 =
|
3183
|
-
_v2 = _v1.get_pointer(
|
3280
|
+
_v1 = @struct.to_ptr
|
3281
|
+
_v2 = _v1.get_pointer(32)
|
3184
3282
|
_v3 = GLib::Node.wrap(_v2)
|
3185
3283
|
_v3
|
3186
3284
|
end
|
3187
3285
|
def children=(value)
|
3188
|
-
_v1 =
|
3286
|
+
_v1 = @struct.to_ptr
|
3189
3287
|
_v2 = GLib::Node.copy_from(value)
|
3190
|
-
_v1.put_pointer(
|
3288
|
+
_v1.put_pointer(32, _v2)
|
3191
3289
|
end
|
3192
3290
|
def data
|
3193
|
-
_v1 =
|
3291
|
+
_v1 = @struct.to_ptr
|
3194
3292
|
_v2 = _v1.get_pointer(0)
|
3195
3293
|
_v2
|
3196
3294
|
end
|
3197
3295
|
def data=(value)
|
3198
|
-
_v1 =
|
3296
|
+
_v1 = @struct.to_ptr
|
3199
3297
|
_v2 = value
|
3200
3298
|
_v1.put_pointer(0, _v2)
|
3201
3299
|
end
|
@@ -3225,37 +3323,37 @@ module GLib
|
|
3225
3323
|
return _v2
|
3226
3324
|
end
|
3227
3325
|
def next
|
3228
|
-
_v1 =
|
3229
|
-
_v2 = _v1.get_pointer(
|
3326
|
+
_v1 = @struct.to_ptr
|
3327
|
+
_v2 = _v1.get_pointer(8)
|
3230
3328
|
_v3 = GLib::Node.wrap(_v2)
|
3231
3329
|
_v3
|
3232
3330
|
end
|
3233
3331
|
def next=(value)
|
3234
|
-
_v1 =
|
3332
|
+
_v1 = @struct.to_ptr
|
3235
3333
|
_v2 = GLib::Node.copy_from(value)
|
3236
|
-
_v1.put_pointer(
|
3334
|
+
_v1.put_pointer(8, _v2)
|
3237
3335
|
end
|
3238
3336
|
def parent
|
3239
|
-
_v1 =
|
3240
|
-
_v2 = _v1.get_pointer(
|
3337
|
+
_v1 = @struct.to_ptr
|
3338
|
+
_v2 = _v1.get_pointer(24)
|
3241
3339
|
_v3 = GLib::Node.wrap(_v2)
|
3242
3340
|
_v3
|
3243
3341
|
end
|
3244
3342
|
def parent=(value)
|
3245
|
-
_v1 =
|
3343
|
+
_v1 = @struct.to_ptr
|
3246
3344
|
_v2 = GLib::Node.copy_from(value)
|
3247
|
-
_v1.put_pointer(
|
3345
|
+
_v1.put_pointer(24, _v2)
|
3248
3346
|
end
|
3249
3347
|
def prev
|
3250
|
-
_v1 =
|
3251
|
-
_v2 = _v1.get_pointer(
|
3348
|
+
_v1 = @struct.to_ptr
|
3349
|
+
_v2 = _v1.get_pointer(16)
|
3252
3350
|
_v3 = GLib::Node.wrap(_v2)
|
3253
3351
|
_v3
|
3254
3352
|
end
|
3255
3353
|
def prev=(value)
|
3256
|
-
_v1 =
|
3354
|
+
_v1 = @struct.to_ptr
|
3257
3355
|
_v2 = GLib::Node.copy_from(value)
|
3258
|
-
_v1.put_pointer(
|
3356
|
+
_v1.put_pointer(16, _v2)
|
3259
3357
|
end
|
3260
3358
|
def reverse_children
|
3261
3359
|
GLib::Lib.g_node_reverse_children(self)
|
@@ -3281,22 +3379,22 @@ module GLib
|
|
3281
3379
|
GLib::Lib.g_once_init_leave(_v1, _v2)
|
3282
3380
|
end
|
3283
3381
|
def retval
|
3284
|
-
_v1 =
|
3285
|
-
_v2 = _v1.get_pointer(
|
3382
|
+
_v1 = @struct.to_ptr
|
3383
|
+
_v2 = _v1.get_pointer(8)
|
3286
3384
|
_v2
|
3287
3385
|
end
|
3288
3386
|
def retval=(value)
|
3289
|
-
_v1 =
|
3387
|
+
_v1 = @struct.to_ptr
|
3290
3388
|
_v2 = value
|
3291
|
-
_v1.put_pointer(
|
3389
|
+
_v1.put_pointer(8, _v2)
|
3292
3390
|
end
|
3293
3391
|
def status
|
3294
|
-
_v1 =
|
3392
|
+
_v1 = @struct.to_ptr
|
3295
3393
|
_v2 = GLib::OnceStatus.get_value_from_pointer(_v1, 0)
|
3296
3394
|
_v2
|
3297
3395
|
end
|
3298
3396
|
def status=(value)
|
3299
|
-
_v1 =
|
3397
|
+
_v1 = @struct.to_ptr
|
3300
3398
|
_v2 = value
|
3301
3399
|
GLib::OnceStatus.copy_value_to_pointer(_v2, _v1)
|
3302
3400
|
end
|
@@ -3367,11 +3465,11 @@ module GLib
|
|
3367
3465
|
end
|
3368
3466
|
def parse_strv(arguments)
|
3369
3467
|
_v1 = FFI::MemoryPointer.new(:pointer)
|
3370
|
-
_v1.put_pointer(0,
|
3468
|
+
_v1.put_pointer(0, GLib::Strv.from(arguments))
|
3371
3469
|
_v2 = FFI::MemoryPointer.new(:pointer).write_pointer(nil)
|
3372
3470
|
_v3 = GLib::Lib.g_option_context_parse_strv(self, _v1, _v2)
|
3373
3471
|
GirFFI::ArgHelper.check_error(_v2)
|
3374
|
-
_v4 =
|
3472
|
+
_v4 = GLib::Strv.wrap(_v1.get_pointer(0))
|
3375
3473
|
return [_v3, _v4]
|
3376
3474
|
end
|
3377
3475
|
def set_description(description = nil)
|
@@ -3408,81 +3506,95 @@ module GLib
|
|
3408
3506
|
_v1 = GirFFI::InPointer.from_utf8(domain)
|
3409
3507
|
GLib::Lib.g_option_context_set_translation_domain(self, _v1)
|
3410
3508
|
end
|
3509
|
+
alias_method 'description', 'get_description'
|
3510
|
+
alias_method 'description=', 'set_description'
|
3511
|
+
alias_method 'help', 'get_help'
|
3512
|
+
alias_method 'help_enabled', 'get_help_enabled'
|
3513
|
+
alias_method 'help_enabled=', 'set_help_enabled'
|
3514
|
+
alias_method 'ignore_unknown_options', 'get_ignore_unknown_options'
|
3515
|
+
alias_method 'ignore_unknown_options=', 'set_ignore_unknown_options'
|
3516
|
+
alias_method 'main_group', 'get_main_group'
|
3517
|
+
alias_method 'main_group=', 'set_main_group'
|
3518
|
+
alias_method 'strict_posix', 'get_strict_posix'
|
3519
|
+
alias_method 'strict_posix=', 'set_strict_posix'
|
3520
|
+
alias_method 'summary', 'get_summary'
|
3521
|
+
alias_method 'summary=', 'set_summary'
|
3522
|
+
alias_method 'translation_domain=', 'set_translation_domain'
|
3411
3523
|
end
|
3412
3524
|
class GLib::OptionEntry < GirFFI::StructBase
|
3413
3525
|
|
3414
3526
|
def arg
|
3415
|
-
_v1 =
|
3416
|
-
_v2 = GLib::OptionArg.get_value_from_pointer(_v1,
|
3527
|
+
_v1 = @struct.to_ptr
|
3528
|
+
_v2 = GLib::OptionArg.get_value_from_pointer(_v1, 16)
|
3417
3529
|
_v2
|
3418
3530
|
end
|
3419
3531
|
def arg=(value)
|
3420
|
-
_v1 =
|
3532
|
+
_v1 = @struct.to_ptr
|
3421
3533
|
_v2 = value
|
3422
|
-
GLib::OptionArg.copy_value_to_pointer(_v2, _v1)
|
3534
|
+
GLib::OptionArg.copy_value_to_pointer(_v2, _v1, 16)
|
3423
3535
|
end
|
3424
3536
|
def arg_data
|
3425
|
-
_v1 =
|
3426
|
-
_v2 = _v1.get_pointer(
|
3537
|
+
_v1 = @struct.to_ptr
|
3538
|
+
_v2 = _v1.get_pointer(24)
|
3427
3539
|
_v2
|
3428
3540
|
end
|
3429
3541
|
def arg_data=(value)
|
3430
|
-
_v1 =
|
3542
|
+
_v1 = @struct.to_ptr
|
3431
3543
|
_v2 = value
|
3432
|
-
_v1.put_pointer(
|
3544
|
+
_v1.put_pointer(24, _v2)
|
3433
3545
|
end
|
3434
3546
|
def arg_description
|
3435
|
-
_v1 =
|
3436
|
-
_v2 = _v1.get_pointer(
|
3547
|
+
_v1 = @struct.to_ptr
|
3548
|
+
_v2 = _v1.get_pointer(40)
|
3437
3549
|
_v3 = _v2.to_utf8
|
3438
3550
|
_v3
|
3439
3551
|
end
|
3440
3552
|
def arg_description=(value)
|
3441
|
-
_v1 =
|
3553
|
+
_v1 = @struct.to_ptr
|
3442
3554
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
3443
|
-
_v1.put_pointer(
|
3555
|
+
_v1.put_pointer(40, _v2)
|
3444
3556
|
end
|
3445
3557
|
def description
|
3446
|
-
_v1 =
|
3447
|
-
_v2 = _v1.get_pointer(
|
3558
|
+
_v1 = @struct.to_ptr
|
3559
|
+
_v2 = _v1.get_pointer(32)
|
3448
3560
|
_v3 = _v2.to_utf8
|
3449
3561
|
_v3
|
3450
3562
|
end
|
3451
3563
|
def description=(value)
|
3452
|
-
_v1 =
|
3564
|
+
_v1 = @struct.to_ptr
|
3453
3565
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
3454
|
-
_v1.put_pointer(
|
3566
|
+
_v1.put_pointer(32, _v2)
|
3455
3567
|
end
|
3456
3568
|
def flags
|
3457
|
-
_v1 =
|
3458
|
-
_v2 = _v1.get_int32(
|
3569
|
+
_v1 = @struct.to_ptr
|
3570
|
+
_v2 = _v1.get_int32(12)
|
3459
3571
|
_v2
|
3460
3572
|
end
|
3461
3573
|
def flags=(value)
|
3462
|
-
_v1 =
|
3574
|
+
_v1 = @struct.to_ptr
|
3463
3575
|
_v2 = value
|
3464
|
-
_v1.put_int32(
|
3576
|
+
_v1.put_int32(12, _v2)
|
3465
3577
|
end
|
3466
3578
|
def long_name
|
3467
|
-
_v1 =
|
3579
|
+
_v1 = @struct.to_ptr
|
3468
3580
|
_v2 = _v1.get_pointer(0)
|
3469
3581
|
_v3 = _v2.to_utf8
|
3470
3582
|
_v3
|
3471
3583
|
end
|
3472
3584
|
def long_name=(value)
|
3473
|
-
_v1 =
|
3585
|
+
_v1 = @struct.to_ptr
|
3474
3586
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
3475
3587
|
_v1.put_pointer(0, _v2)
|
3476
3588
|
end
|
3477
3589
|
def short_name
|
3478
|
-
_v1 =
|
3479
|
-
_v2 = _v1.get_int8(
|
3590
|
+
_v1 = @struct.to_ptr
|
3591
|
+
_v2 = _v1.get_int8(8)
|
3480
3592
|
_v2
|
3481
3593
|
end
|
3482
3594
|
def short_name=(value)
|
3483
|
-
_v1 =
|
3595
|
+
_v1 = @struct.to_ptr
|
3484
3596
|
_v2 = value
|
3485
|
-
_v1.put_int8(
|
3597
|
+
_v1.put_int8(8, _v2)
|
3486
3598
|
end
|
3487
3599
|
end
|
3488
3600
|
# XXX: Don't know how to print enum
|
@@ -3519,6 +3631,7 @@ module GLib
|
|
3519
3631
|
def unref
|
3520
3632
|
GLib::Lib.g_option_group_unref(self)
|
3521
3633
|
end
|
3634
|
+
alias_method 'translation_domain=', 'set_translation_domain'
|
3522
3635
|
end
|
3523
3636
|
# XXX: Don't know how to print callback
|
3524
3637
|
PDP_ENDIAN = 3412
|
@@ -3546,34 +3659,34 @@ module GLib
|
|
3546
3659
|
class GLib::PollFD < GirFFI::BoxedBase
|
3547
3660
|
|
3548
3661
|
def events
|
3549
|
-
_v1 =
|
3550
|
-
_v2 = _v1.get_uint16(
|
3662
|
+
_v1 = @struct.to_ptr
|
3663
|
+
_v2 = _v1.get_uint16(4)
|
3551
3664
|
_v2
|
3552
3665
|
end
|
3553
3666
|
def events=(value)
|
3554
|
-
_v1 =
|
3667
|
+
_v1 = @struct.to_ptr
|
3555
3668
|
_v2 = value
|
3556
|
-
_v1.put_uint16(
|
3669
|
+
_v1.put_uint16(4, _v2)
|
3557
3670
|
end
|
3558
3671
|
def fd
|
3559
|
-
_v1 =
|
3672
|
+
_v1 = @struct.to_ptr
|
3560
3673
|
_v2 = _v1.get_int32(0)
|
3561
3674
|
_v2
|
3562
3675
|
end
|
3563
3676
|
def fd=(value)
|
3564
|
-
_v1 =
|
3677
|
+
_v1 = @struct.to_ptr
|
3565
3678
|
_v2 = value
|
3566
3679
|
_v1.put_int32(0, _v2)
|
3567
3680
|
end
|
3568
3681
|
def revents
|
3569
|
-
_v1 =
|
3570
|
-
_v2 = _v1.get_uint16(
|
3682
|
+
_v1 = @struct.to_ptr
|
3683
|
+
_v2 = _v1.get_uint16(6)
|
3571
3684
|
_v2
|
3572
3685
|
end
|
3573
3686
|
def revents=(value)
|
3574
|
-
_v1 =
|
3687
|
+
_v1 = @struct.to_ptr
|
3575
3688
|
_v2 = value
|
3576
|
-
_v1.put_uint16(
|
3689
|
+
_v1.put_uint16(6, _v2)
|
3577
3690
|
end
|
3578
3691
|
end
|
3579
3692
|
# XXX: Don't know how to print callback
|
@@ -3581,8 +3694,8 @@ module GLib
|
|
3581
3694
|
class GLib::Private < GirFFI::StructBase
|
3582
3695
|
|
3583
3696
|
def future
|
3584
|
-
_v1 =
|
3585
|
-
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1,
|
3697
|
+
_v1 = @struct.to_ptr
|
3698
|
+
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 16)
|
3586
3699
|
_v3 = GirFFI::SizedArray.wrap([:pointer, :void], 2, _v2)
|
3587
3700
|
_v3
|
3588
3701
|
end
|
@@ -3591,12 +3704,12 @@ module GLib
|
|
3591
3704
|
return _v1
|
3592
3705
|
end
|
3593
3706
|
def notify
|
3594
|
-
_v1 =
|
3595
|
-
_v2 = GLib::DestroyNotify.get_value_from_pointer(_v1,
|
3707
|
+
_v1 = @struct.to_ptr
|
3708
|
+
_v2 = GLib::DestroyNotify.get_value_from_pointer(_v1, 8)
|
3596
3709
|
_v2
|
3597
3710
|
end
|
3598
3711
|
def p
|
3599
|
-
_v1 =
|
3712
|
+
_v1 = @struct.to_ptr
|
3600
3713
|
_v2 = _v1.get_pointer(0)
|
3601
3714
|
_v2
|
3602
3715
|
end
|
@@ -3626,35 +3739,46 @@ module GLib
|
|
3626
3739
|
def add_array(ary)
|
3627
3740
|
ary.each { |item| add(item) }
|
3628
3741
|
end
|
3629
|
-
def data_ptr
|
3630
|
-
@struct[:pdata]
|
3631
|
-
end
|
3632
3742
|
def each
|
3633
3743
|
length.times { |idx| yield(index(idx)) }
|
3634
3744
|
end
|
3635
|
-
|
3636
|
-
|
3745
|
+
# Re-implementation of the g_ptrarray_index macro
|
3746
|
+
def index(idx)
|
3747
|
+
unless (0...length).cover?(idx) then
|
3748
|
+
raise(IndexError, "Index #{idx} outside of bounds 0..#{(length - 1)}")
|
3749
|
+
end
|
3750
|
+
item_ptr = (data_ptr + (idx * element_size))
|
3751
|
+
convert_element_type = case element_type
|
3752
|
+
when :utf8 then
|
3753
|
+
:utf8
|
3754
|
+
when GirFFI::ObjectBase then
|
3755
|
+
element_type
|
3756
|
+
else
|
3757
|
+
[:pointer, element_type]
|
3758
|
+
end
|
3759
|
+
convertor = GirFFI::ArrayElementConvertor.new(convert_element_type, item_ptr)
|
3760
|
+
convertor.to_ruby_value
|
3637
3761
|
end
|
3638
3762
|
def len
|
3639
|
-
_v1 =
|
3640
|
-
_v2 = _v1.get_uint32(
|
3763
|
+
_v1 = @struct.to_ptr
|
3764
|
+
_v2 = _v1.get_uint32(8)
|
3641
3765
|
_v2
|
3642
3766
|
end
|
3643
3767
|
def len=(value)
|
3644
|
-
_v1 =
|
3768
|
+
_v1 = @struct.to_ptr
|
3645
3769
|
_v2 = value
|
3646
|
-
_v1.put_uint32(
|
3770
|
+
_v1.put_uint32(8, _v2)
|
3647
3771
|
end
|
3648
3772
|
def length
|
3649
|
-
|
3773
|
+
struct[:len]
|
3650
3774
|
end
|
3651
3775
|
def pdata
|
3652
|
-
_v1 =
|
3776
|
+
_v1 = @struct.to_ptr
|
3653
3777
|
_v2 = _v1.get_pointer(0)
|
3654
3778
|
_v2
|
3655
3779
|
end
|
3656
3780
|
def pdata=(value)
|
3657
|
-
_v1 =
|
3781
|
+
_v1 = @struct.to_ptr
|
3658
3782
|
_v2 = value
|
3659
3783
|
_v1.put_pointer(0, _v2)
|
3660
3784
|
end
|
@@ -3668,6 +3792,10 @@ module GLib
|
|
3668
3792
|
def clear
|
3669
3793
|
GLib::Lib.g_queue_clear(self)
|
3670
3794
|
end
|
3795
|
+
def clear_full(&free_func)
|
3796
|
+
_v1 = GLib::DestroyNotify.from(free_func)
|
3797
|
+
GLib::Lib.g_queue_clear_full(self, _v1)
|
3798
|
+
end
|
3671
3799
|
def free
|
3672
3800
|
GLib::Lib.g_queue_free(self)
|
3673
3801
|
end
|
@@ -3680,13 +3808,13 @@ module GLib
|
|
3680
3808
|
return _v1
|
3681
3809
|
end
|
3682
3810
|
def head
|
3683
|
-
_v1 =
|
3811
|
+
_v1 = @struct.to_ptr
|
3684
3812
|
_v2 = _v1.get_pointer(0)
|
3685
3813
|
_v3 = GLib::List.wrap([:pointer, :void], _v2)
|
3686
3814
|
_v3
|
3687
3815
|
end
|
3688
3816
|
def head=(value)
|
3689
|
-
_v1 =
|
3817
|
+
_v1 = @struct.to_ptr
|
3690
3818
|
_v2 = GLib::List.from([:pointer, :void], value)
|
3691
3819
|
_v1.put_pointer(0, _v2)
|
3692
3820
|
end
|
@@ -3703,14 +3831,14 @@ module GLib
|
|
3703
3831
|
return _v1
|
3704
3832
|
end
|
3705
3833
|
def length
|
3706
|
-
_v1 =
|
3707
|
-
_v2 = _v1.get_uint32(
|
3834
|
+
_v1 = @struct.to_ptr
|
3835
|
+
_v2 = _v1.get_uint32(16)
|
3708
3836
|
_v2
|
3709
3837
|
end
|
3710
3838
|
def length=(value)
|
3711
|
-
_v1 =
|
3839
|
+
_v1 = @struct.to_ptr
|
3712
3840
|
_v2 = value
|
3713
|
-
_v1.put_uint32(
|
3841
|
+
_v1.put_uint32(16, _v2)
|
3714
3842
|
end
|
3715
3843
|
def peek_head
|
3716
3844
|
_v1 = GLib::Lib.g_queue_peek_head(self)
|
@@ -3765,15 +3893,15 @@ module GLib
|
|
3765
3893
|
GLib::Lib.g_queue_reverse(self)
|
3766
3894
|
end
|
3767
3895
|
def tail
|
3768
|
-
_v1 =
|
3769
|
-
_v2 = _v1.get_pointer(
|
3896
|
+
_v1 = @struct.to_ptr
|
3897
|
+
_v2 = _v1.get_pointer(8)
|
3770
3898
|
_v3 = GLib::List.wrap([:pointer, :void], _v2)
|
3771
3899
|
_v3
|
3772
3900
|
end
|
3773
3901
|
def tail=(value)
|
3774
|
-
_v1 =
|
3902
|
+
_v1 = @struct.to_ptr
|
3775
3903
|
_v2 = GLib::List.from([:pointer, :void], value)
|
3776
|
-
_v1.put_pointer(
|
3904
|
+
_v1.put_pointer(8, _v2)
|
3777
3905
|
end
|
3778
3906
|
end
|
3779
3907
|
class GLib::RWLock < GirFFI::StructBase
|
@@ -3782,8 +3910,8 @@ module GLib
|
|
3782
3910
|
GLib::Lib.g_rw_lock_clear(self)
|
3783
3911
|
end
|
3784
3912
|
def i
|
3785
|
-
_v1 =
|
3786
|
-
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1,
|
3913
|
+
_v1 = @struct.to_ptr
|
3914
|
+
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 8)
|
3787
3915
|
_v3 = GirFFI::SizedArray.wrap(:guint32, 2, _v2)
|
3788
3916
|
_v3
|
3789
3917
|
end
|
@@ -3791,7 +3919,7 @@ module GLib
|
|
3791
3919
|
GLib::Lib.g_rw_lock_init(self)
|
3792
3920
|
end
|
3793
3921
|
def p
|
3794
|
-
_v1 =
|
3922
|
+
_v1 = @struct.to_ptr
|
3795
3923
|
_v2 = _v1.get_pointer(0)
|
3796
3924
|
_v2
|
3797
3925
|
end
|
@@ -3850,6 +3978,7 @@ module GLib
|
|
3850
3978
|
_v2 = seed_length
|
3851
3979
|
GLib::Lib.g_rand_set_seed_array(self, _v1, _v2)
|
3852
3980
|
end
|
3981
|
+
alias_method 'seed=', 'set_seed'
|
3853
3982
|
end
|
3854
3983
|
class GLib::RecMutex < GirFFI::StructBase
|
3855
3984
|
|
@@ -3857,8 +3986,8 @@ module GLib
|
|
3857
3986
|
GLib::Lib.g_rec_mutex_clear(self)
|
3858
3987
|
end
|
3859
3988
|
def i
|
3860
|
-
_v1 =
|
3861
|
-
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1,
|
3989
|
+
_v1 = @struct.to_ptr
|
3990
|
+
_v2 = GirFFI::SizedArray.get_value_from_pointer(_v1, 8)
|
3862
3991
|
_v3 = GirFFI::SizedArray.wrap(:guint32, 2, _v2)
|
3863
3992
|
_v3
|
3864
3993
|
end
|
@@ -3869,7 +3998,7 @@ module GLib
|
|
3869
3998
|
GLib::Lib.g_rec_mutex_lock(self)
|
3870
3999
|
end
|
3871
4000
|
def p
|
3872
|
-
_v1 =
|
4001
|
+
_v1 = @struct.to_ptr
|
3873
4002
|
_v2 = _v1.get_pointer(0)
|
3874
4003
|
_v2
|
3875
4004
|
end
|
@@ -4062,6 +4191,14 @@ module GLib
|
|
4062
4191
|
def unref
|
4063
4192
|
GLib::Lib.g_regex_unref(self)
|
4064
4193
|
end
|
4194
|
+
alias_method 'capture_count', 'get_capture_count'
|
4195
|
+
alias_method 'compile_flags', 'get_compile_flags'
|
4196
|
+
alias_method 'has_cr_or_lf', 'get_has_cr_or_lf'
|
4197
|
+
alias_method 'match_flags', 'get_match_flags'
|
4198
|
+
alias_method 'max_backref', 'get_max_backref'
|
4199
|
+
alias_method 'max_lookbehind', 'get_max_lookbehind'
|
4200
|
+
alias_method 'pattern', 'get_pattern'
|
4201
|
+
alias_method 'string_number', 'get_string_number'
|
4065
4202
|
end
|
4066
4203
|
# XXX: Don't know how to print flags
|
4067
4204
|
# XXX: Don't know how to print enum
|
@@ -4078,14 +4215,14 @@ module GLib
|
|
4078
4215
|
arr.reverse.reduce(new(type)) { |lst, val| lst.prepend(val) }
|
4079
4216
|
end
|
4080
4217
|
def data=(value)
|
4081
|
-
_v1 =
|
4218
|
+
_v1 = @struct.to_ptr
|
4082
4219
|
_v2 = value
|
4083
4220
|
_v1.put_pointer(0, _v2)
|
4084
4221
|
end
|
4085
4222
|
def next=(value)
|
4086
|
-
_v1 =
|
4223
|
+
_v1 = @struct.to_ptr
|
4087
4224
|
_v2 = GLib::SList.from([:pointer, :void], value)
|
4088
|
-
_v1.put_pointer(
|
4225
|
+
_v1.put_pointer(8, _v2)
|
4089
4226
|
end
|
4090
4227
|
def prepend(data)
|
4091
4228
|
self.class.wrap(element_type, Lib.g_slist_prepend(self, element_ptr_for(data)))
|
@@ -4106,21 +4243,21 @@ module GLib
|
|
4106
4243
|
class GLib::Scanner < GirFFI::StructBase
|
4107
4244
|
|
4108
4245
|
def buffer
|
4109
|
-
_v1 =
|
4110
|
-
_v2 = _v1.get_pointer(
|
4246
|
+
_v1 = @struct.to_ptr
|
4247
|
+
_v2 = _v1.get_pointer(120)
|
4111
4248
|
_v3 = _v2.to_utf8
|
4112
4249
|
_v3
|
4113
4250
|
end
|
4114
4251
|
def config
|
4115
|
-
_v1 =
|
4116
|
-
_v2 = _v1.get_pointer(
|
4252
|
+
_v1 = @struct.to_ptr
|
4253
|
+
_v2 = _v1.get_pointer(32)
|
4117
4254
|
_v3 = GLib::ScannerConfig.wrap(_v2)
|
4118
4255
|
_v3
|
4119
4256
|
end
|
4120
4257
|
def config=(value)
|
4121
|
-
_v1 =
|
4258
|
+
_v1 = @struct.to_ptr
|
4122
4259
|
_v2 = GLib::ScannerConfig.copy_from(value)
|
4123
|
-
_v1.put_pointer(
|
4260
|
+
_v1.put_pointer(32, _v2)
|
4124
4261
|
end
|
4125
4262
|
def cur_line
|
4126
4263
|
_v1 = GLib::Lib.g_scanner_cur_line(self)
|
@@ -4146,8 +4283,8 @@ module GLib
|
|
4146
4283
|
return _v1
|
4147
4284
|
end
|
4148
4285
|
def input_fd
|
4149
|
-
_v1 =
|
4150
|
-
_v2 = _v1.get_int32(
|
4286
|
+
_v1 = @struct.to_ptr
|
4287
|
+
_v2 = _v1.get_int32(96)
|
4151
4288
|
_v2
|
4152
4289
|
end
|
4153
4290
|
def input_file(input_fd)
|
@@ -4155,15 +4292,15 @@ module GLib
|
|
4155
4292
|
GLib::Lib.g_scanner_input_file(self, _v1)
|
4156
4293
|
end
|
4157
4294
|
def input_name
|
4158
|
-
_v1 =
|
4159
|
-
_v2 = _v1.get_pointer(
|
4295
|
+
_v1 = @struct.to_ptr
|
4296
|
+
_v2 = _v1.get_pointer(16)
|
4160
4297
|
_v3 = _v2.to_utf8
|
4161
4298
|
_v3
|
4162
4299
|
end
|
4163
4300
|
def input_name=(value)
|
4164
|
-
_v1 =
|
4301
|
+
_v1 = @struct.to_ptr
|
4165
4302
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
4166
|
-
_v1.put_pointer(
|
4303
|
+
_v1.put_pointer(16, _v2)
|
4167
4304
|
end
|
4168
4305
|
def input_text(text, text_len)
|
4169
4306
|
_v1 = GirFFI::InPointer.from_utf8(text)
|
@@ -4171,14 +4308,14 @@ module GLib
|
|
4171
4308
|
GLib::Lib.g_scanner_input_text(self, _v1, _v2)
|
4172
4309
|
end
|
4173
4310
|
def line
|
4174
|
-
_v1 =
|
4175
|
-
_v2 = _v1.get_uint32(
|
4311
|
+
_v1 = @struct.to_ptr
|
4312
|
+
_v2 = _v1.get_uint32(56)
|
4176
4313
|
_v2
|
4177
4314
|
end
|
4178
4315
|
def line=(value)
|
4179
|
-
_v1 =
|
4316
|
+
_v1 = @struct.to_ptr
|
4180
4317
|
_v2 = value
|
4181
|
-
_v1.put_uint32(
|
4318
|
+
_v1.put_uint32(56, _v2)
|
4182
4319
|
end
|
4183
4320
|
def lookup_symbol(symbol)
|
4184
4321
|
_v1 = GirFFI::InPointer.from_utf8(symbol)
|
@@ -4186,89 +4323,89 @@ module GLib
|
|
4186
4323
|
return _v2
|
4187
4324
|
end
|
4188
4325
|
def max_parse_errors
|
4189
|
-
_v1 =
|
4190
|
-
_v2 = _v1.get_uint32(
|
4326
|
+
_v1 = @struct.to_ptr
|
4327
|
+
_v2 = _v1.get_uint32(8)
|
4191
4328
|
_v2
|
4192
4329
|
end
|
4193
4330
|
def max_parse_errors=(value)
|
4194
|
-
_v1 =
|
4331
|
+
_v1 = @struct.to_ptr
|
4195
4332
|
_v2 = value
|
4196
|
-
_v1.put_uint32(
|
4333
|
+
_v1.put_uint32(8, _v2)
|
4197
4334
|
end
|
4198
4335
|
def msg_handler
|
4199
|
-
_v1 =
|
4200
|
-
_v2 = GLib::ScannerMsgFunc.get_value_from_pointer(_v1,
|
4336
|
+
_v1 = @struct.to_ptr
|
4337
|
+
_v2 = GLib::ScannerMsgFunc.get_value_from_pointer(_v1, 136)
|
4201
4338
|
_v2
|
4202
4339
|
end
|
4203
4340
|
def msg_handler=(value)
|
4204
|
-
_v1 =
|
4341
|
+
_v1 = @struct.to_ptr
|
4205
4342
|
_v2 = GLib::ScannerMsgFunc.from(value)
|
4206
|
-
GLib::ScannerMsgFunc.copy_value_to_pointer(_v2, _v1)
|
4343
|
+
GLib::ScannerMsgFunc.copy_value_to_pointer(_v2, _v1, 136)
|
4207
4344
|
end
|
4208
4345
|
def next_line
|
4209
|
-
_v1 =
|
4210
|
-
_v2 = _v1.get_uint32(
|
4346
|
+
_v1 = @struct.to_ptr
|
4347
|
+
_v2 = _v1.get_uint32(80)
|
4211
4348
|
_v2
|
4212
4349
|
end
|
4213
4350
|
def next_line=(value)
|
4214
|
-
_v1 =
|
4351
|
+
_v1 = @struct.to_ptr
|
4215
4352
|
_v2 = value
|
4216
|
-
_v1.put_uint32(
|
4353
|
+
_v1.put_uint32(80, _v2)
|
4217
4354
|
end
|
4218
4355
|
def next_position
|
4219
|
-
_v1 =
|
4220
|
-
_v2 = _v1.get_uint32(
|
4356
|
+
_v1 = @struct.to_ptr
|
4357
|
+
_v2 = _v1.get_uint32(84)
|
4221
4358
|
_v2
|
4222
4359
|
end
|
4223
4360
|
def next_position=(value)
|
4224
|
-
_v1 =
|
4361
|
+
_v1 = @struct.to_ptr
|
4225
4362
|
_v2 = value
|
4226
|
-
_v1.put_uint32(
|
4363
|
+
_v1.put_uint32(84, _v2)
|
4227
4364
|
end
|
4228
4365
|
def next_token
|
4229
|
-
_v1 =
|
4230
|
-
_v2 = GLib::TokenType.get_value_from_pointer(_v1,
|
4366
|
+
_v1 = @struct.to_ptr
|
4367
|
+
_v2 = GLib::TokenType.get_value_from_pointer(_v1, 64)
|
4231
4368
|
_v2
|
4232
4369
|
end
|
4233
4370
|
def next_token=(value)
|
4234
|
-
_v1 =
|
4371
|
+
_v1 = @struct.to_ptr
|
4235
4372
|
_v2 = value
|
4236
|
-
GLib::TokenType.copy_value_to_pointer(_v2, _v1)
|
4373
|
+
GLib::TokenType.copy_value_to_pointer(_v2, _v1, 64)
|
4237
4374
|
end
|
4238
4375
|
def next_value
|
4239
|
-
_v1 =
|
4240
|
-
_v2 = GLib::TokenValue.get_value_from_pointer(_v1,
|
4376
|
+
_v1 = @struct.to_ptr
|
4377
|
+
_v2 = GLib::TokenValue.get_value_from_pointer(_v1, 72)
|
4241
4378
|
_v3 = GLib::TokenValue.wrap(_v2)
|
4242
4379
|
_v3
|
4243
4380
|
end
|
4244
4381
|
def next_value=(value)
|
4245
|
-
_v1 =
|
4382
|
+
_v1 = @struct.to_ptr
|
4246
4383
|
_v2 = value
|
4247
|
-
GLib::TokenValue.copy_value_to_pointer(_v2, _v1)
|
4384
|
+
GLib::TokenValue.copy_value_to_pointer(_v2, _v1, 72)
|
4248
4385
|
end
|
4249
4386
|
def parse_errors
|
4250
|
-
_v1 =
|
4251
|
-
_v2 = _v1.get_uint32(
|
4387
|
+
_v1 = @struct.to_ptr
|
4388
|
+
_v2 = _v1.get_uint32(12)
|
4252
4389
|
_v2
|
4253
4390
|
end
|
4254
4391
|
def parse_errors=(value)
|
4255
|
-
_v1 =
|
4392
|
+
_v1 = @struct.to_ptr
|
4256
4393
|
_v2 = value
|
4257
|
-
_v1.put_uint32(
|
4394
|
+
_v1.put_uint32(12, _v2)
|
4258
4395
|
end
|
4259
4396
|
def peek_next_token
|
4260
4397
|
_v1 = GLib::Lib.g_scanner_peek_next_token(self)
|
4261
4398
|
return _v1
|
4262
4399
|
end
|
4263
4400
|
def position
|
4264
|
-
_v1 =
|
4265
|
-
_v2 = _v1.get_uint32(
|
4401
|
+
_v1 = @struct.to_ptr
|
4402
|
+
_v2 = _v1.get_uint32(60)
|
4266
4403
|
_v2
|
4267
4404
|
end
|
4268
4405
|
def position=(value)
|
4269
|
-
_v1 =
|
4406
|
+
_v1 = @struct.to_ptr
|
4270
4407
|
_v2 = value
|
4271
|
-
_v1.put_uint32(
|
4408
|
+
_v1.put_uint32(60, _v2)
|
4272
4409
|
end
|
4273
4410
|
def scope_add_symbol(scope_id, symbol, value = nil)
|
4274
4411
|
_v1 = scope_id
|
@@ -4277,8 +4414,8 @@ module GLib
|
|
4277
4414
|
GLib::Lib.g_scanner_scope_add_symbol(self, _v1, _v2, _v3)
|
4278
4415
|
end
|
4279
4416
|
def scope_id
|
4280
|
-
_v1 =
|
4281
|
-
_v2 = _v1.get_uint32(
|
4417
|
+
_v1 = @struct.to_ptr
|
4418
|
+
_v2 = _v1.get_uint32(128)
|
4282
4419
|
_v2
|
4283
4420
|
end
|
4284
4421
|
def scope_lookup_symbol(scope_id, symbol)
|
@@ -4298,8 +4435,8 @@ module GLib
|
|
4298
4435
|
return _v2
|
4299
4436
|
end
|
4300
4437
|
def symbol_table
|
4301
|
-
_v1 =
|
4302
|
-
_v2 = _v1.get_pointer(
|
4438
|
+
_v1 = @struct.to_ptr
|
4439
|
+
_v2 = _v1.get_pointer(88)
|
4303
4440
|
_v3 = GLib::HashTable.wrap([[:pointer, :void], [:pointer, :void]], _v2)
|
4304
4441
|
_v3
|
4305
4442
|
end
|
@@ -4307,26 +4444,26 @@ module GLib
|
|
4307
4444
|
GLib::Lib.g_scanner_sync_file_offset(self)
|
4308
4445
|
end
|
4309
4446
|
def text
|
4310
|
-
_v1 =
|
4311
|
-
_v2 = _v1.get_pointer(
|
4447
|
+
_v1 = @struct.to_ptr
|
4448
|
+
_v2 = _v1.get_pointer(104)
|
4312
4449
|
_v3 = _v2.to_utf8
|
4313
4450
|
_v3
|
4314
4451
|
end
|
4315
4452
|
def text_end
|
4316
|
-
_v1 =
|
4317
|
-
_v2 = _v1.get_pointer(
|
4453
|
+
_v1 = @struct.to_ptr
|
4454
|
+
_v2 = _v1.get_pointer(112)
|
4318
4455
|
_v3 = _v2.to_utf8
|
4319
4456
|
_v3
|
4320
4457
|
end
|
4321
4458
|
def token
|
4322
|
-
_v1 =
|
4323
|
-
_v2 = GLib::TokenType.get_value_from_pointer(_v1,
|
4459
|
+
_v1 = @struct.to_ptr
|
4460
|
+
_v2 = GLib::TokenType.get_value_from_pointer(_v1, 40)
|
4324
4461
|
_v2
|
4325
4462
|
end
|
4326
4463
|
def token=(value)
|
4327
|
-
_v1 =
|
4464
|
+
_v1 = @struct.to_ptr
|
4328
4465
|
_v2 = value
|
4329
|
-
GLib::TokenType.copy_value_to_pointer(_v2, _v1)
|
4466
|
+
GLib::TokenType.copy_value_to_pointer(_v2, _v1, 40)
|
4330
4467
|
end
|
4331
4468
|
def unexp_token(expected_token, identifier_spec, symbol_spec, symbol_name, message, is_error)
|
4332
4469
|
_v1 = expected_token
|
@@ -4338,297 +4475,298 @@ module GLib
|
|
4338
4475
|
GLib::Lib.g_scanner_unexp_token(self, _v1, _v2, _v3, _v4, _v5, _v6)
|
4339
4476
|
end
|
4340
4477
|
def user_data
|
4341
|
-
_v1 =
|
4478
|
+
_v1 = @struct.to_ptr
|
4342
4479
|
_v2 = _v1.get_pointer(0)
|
4343
4480
|
_v2
|
4344
4481
|
end
|
4345
4482
|
def user_data=(value)
|
4346
|
-
_v1 =
|
4483
|
+
_v1 = @struct.to_ptr
|
4347
4484
|
_v2 = value
|
4348
4485
|
_v1.put_pointer(0, _v2)
|
4349
4486
|
end
|
4350
4487
|
def value
|
4351
|
-
_v1 =
|
4352
|
-
_v2 = GLib::TokenValue.get_value_from_pointer(_v1,
|
4488
|
+
_v1 = @struct.to_ptr
|
4489
|
+
_v2 = GLib::TokenValue.get_value_from_pointer(_v1, 48)
|
4353
4490
|
_v3 = GLib::TokenValue.wrap(_v2)
|
4354
4491
|
_v3
|
4355
4492
|
end
|
4356
4493
|
def value=(value)
|
4357
|
-
_v1 =
|
4494
|
+
_v1 = @struct.to_ptr
|
4358
4495
|
_v2 = value
|
4359
|
-
GLib::TokenValue.copy_value_to_pointer(_v2, _v1)
|
4496
|
+
GLib::TokenValue.copy_value_to_pointer(_v2, _v1, 48)
|
4360
4497
|
end
|
4498
|
+
alias_method 'scope=', 'set_scope'
|
4361
4499
|
end
|
4362
4500
|
class GLib::ScannerConfig < GirFFI::StructBase
|
4363
4501
|
|
4364
4502
|
def case_sensitive
|
4365
|
-
_v1 =
|
4366
|
-
_v2 = _v1.get_uint32(
|
4503
|
+
_v1 = @struct.to_ptr
|
4504
|
+
_v2 = _v1.get_uint32(32)
|
4367
4505
|
_v2
|
4368
4506
|
end
|
4369
4507
|
def case_sensitive=(value)
|
4370
|
-
_v1 =
|
4508
|
+
_v1 = @struct.to_ptr
|
4371
4509
|
_v2 = value
|
4372
|
-
_v1.put_uint32(
|
4510
|
+
_v1.put_uint32(32, _v2)
|
4373
4511
|
end
|
4374
4512
|
def char_2_token
|
4375
|
-
_v1 =
|
4376
|
-
_v2 = _v1.get_uint32(
|
4513
|
+
_v1 = @struct.to_ptr
|
4514
|
+
_v2 = _v1.get_uint32(104)
|
4377
4515
|
_v2
|
4378
4516
|
end
|
4379
4517
|
def char_2_token=(value)
|
4380
|
-
_v1 =
|
4518
|
+
_v1 = @struct.to_ptr
|
4381
4519
|
_v2 = value
|
4382
|
-
_v1.put_uint32(
|
4520
|
+
_v1.put_uint32(104, _v2)
|
4383
4521
|
end
|
4384
4522
|
def cpair_comment_single
|
4385
|
-
_v1 =
|
4386
|
-
_v2 = _v1.get_pointer(
|
4523
|
+
_v1 = @struct.to_ptr
|
4524
|
+
_v2 = _v1.get_pointer(24)
|
4387
4525
|
_v3 = _v2.to_utf8
|
4388
4526
|
_v3
|
4389
4527
|
end
|
4390
4528
|
def cpair_comment_single=(value)
|
4391
|
-
_v1 =
|
4529
|
+
_v1 = @struct.to_ptr
|
4392
4530
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
4393
|
-
_v1.put_pointer(
|
4531
|
+
_v1.put_pointer(24, _v2)
|
4394
4532
|
end
|
4395
4533
|
def cset_identifier_first
|
4396
|
-
_v1 =
|
4397
|
-
_v2 = _v1.get_pointer(
|
4534
|
+
_v1 = @struct.to_ptr
|
4535
|
+
_v2 = _v1.get_pointer(8)
|
4398
4536
|
_v3 = _v2.to_utf8
|
4399
4537
|
_v3
|
4400
4538
|
end
|
4401
4539
|
def cset_identifier_first=(value)
|
4402
|
-
_v1 =
|
4540
|
+
_v1 = @struct.to_ptr
|
4403
4541
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
4404
|
-
_v1.put_pointer(
|
4542
|
+
_v1.put_pointer(8, _v2)
|
4405
4543
|
end
|
4406
4544
|
def cset_identifier_nth
|
4407
|
-
_v1 =
|
4408
|
-
_v2 = _v1.get_pointer(
|
4545
|
+
_v1 = @struct.to_ptr
|
4546
|
+
_v2 = _v1.get_pointer(16)
|
4409
4547
|
_v3 = _v2.to_utf8
|
4410
4548
|
_v3
|
4411
4549
|
end
|
4412
4550
|
def cset_identifier_nth=(value)
|
4413
|
-
_v1 =
|
4551
|
+
_v1 = @struct.to_ptr
|
4414
4552
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
4415
|
-
_v1.put_pointer(
|
4553
|
+
_v1.put_pointer(16, _v2)
|
4416
4554
|
end
|
4417
4555
|
def cset_skip_characters
|
4418
|
-
_v1 =
|
4556
|
+
_v1 = @struct.to_ptr
|
4419
4557
|
_v2 = _v1.get_pointer(0)
|
4420
4558
|
_v3 = _v2.to_utf8
|
4421
4559
|
_v3
|
4422
4560
|
end
|
4423
4561
|
def cset_skip_characters=(value)
|
4424
|
-
_v1 =
|
4562
|
+
_v1 = @struct.to_ptr
|
4425
4563
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
4426
4564
|
_v1.put_pointer(0, _v2)
|
4427
4565
|
end
|
4428
4566
|
def identifier_2_string
|
4429
|
-
_v1 =
|
4430
|
-
_v2 = _v1.get_uint32(
|
4567
|
+
_v1 = @struct.to_ptr
|
4568
|
+
_v2 = _v1.get_uint32(100)
|
4431
4569
|
_v2
|
4432
4570
|
end
|
4433
4571
|
def identifier_2_string=(value)
|
4434
|
-
_v1 =
|
4572
|
+
_v1 = @struct.to_ptr
|
4435
4573
|
_v2 = value
|
4436
|
-
_v1.put_uint32(
|
4574
|
+
_v1.put_uint32(100, _v2)
|
4437
4575
|
end
|
4438
4576
|
def int_2_float
|
4439
|
-
_v1 =
|
4440
|
-
_v2 = _v1.get_uint32(
|
4577
|
+
_v1 = @struct.to_ptr
|
4578
|
+
_v2 = _v1.get_uint32(96)
|
4441
4579
|
_v2
|
4442
4580
|
end
|
4443
4581
|
def int_2_float=(value)
|
4444
|
-
_v1 =
|
4582
|
+
_v1 = @struct.to_ptr
|
4445
4583
|
_v2 = value
|
4446
|
-
_v1.put_uint32(
|
4584
|
+
_v1.put_uint32(96, _v2)
|
4447
4585
|
end
|
4448
4586
|
def numbers_2_int
|
4449
|
-
_v1 =
|
4450
|
-
_v2 = _v1.get_uint32(
|
4587
|
+
_v1 = @struct.to_ptr
|
4588
|
+
_v2 = _v1.get_uint32(92)
|
4451
4589
|
_v2
|
4452
4590
|
end
|
4453
4591
|
def numbers_2_int=(value)
|
4454
|
-
_v1 =
|
4592
|
+
_v1 = @struct.to_ptr
|
4455
4593
|
_v2 = value
|
4456
|
-
_v1.put_uint32(
|
4594
|
+
_v1.put_uint32(92, _v2)
|
4457
4595
|
end
|
4458
4596
|
def padding_dummy
|
4459
|
-
_v1 =
|
4460
|
-
_v2 = _v1.get_uint32(
|
4597
|
+
_v1 = @struct.to_ptr
|
4598
|
+
_v2 = _v1.get_uint32(120)
|
4461
4599
|
_v2
|
4462
4600
|
end
|
4463
4601
|
def scan_binary
|
4464
|
-
_v1 =
|
4465
|
-
_v2 = _v1.get_uint32(
|
4602
|
+
_v1 = @struct.to_ptr
|
4603
|
+
_v2 = _v1.get_uint32(64)
|
4466
4604
|
_v2
|
4467
4605
|
end
|
4468
4606
|
def scan_binary=(value)
|
4469
|
-
_v1 =
|
4607
|
+
_v1 = @struct.to_ptr
|
4470
4608
|
_v2 = value
|
4471
|
-
_v1.put_uint32(
|
4609
|
+
_v1.put_uint32(64, _v2)
|
4472
4610
|
end
|
4473
4611
|
def scan_comment_multi
|
4474
|
-
_v1 =
|
4475
|
-
_v2 = _v1.get_uint32(
|
4612
|
+
_v1 = @struct.to_ptr
|
4613
|
+
_v2 = _v1.get_uint32(44)
|
4476
4614
|
_v2
|
4477
4615
|
end
|
4478
4616
|
def scan_comment_multi=(value)
|
4479
|
-
_v1 =
|
4617
|
+
_v1 = @struct.to_ptr
|
4480
4618
|
_v2 = value
|
4481
|
-
_v1.put_uint32(
|
4619
|
+
_v1.put_uint32(44, _v2)
|
4482
4620
|
end
|
4483
4621
|
def scan_float
|
4484
|
-
_v1 =
|
4485
|
-
_v2 = _v1.get_uint32(
|
4622
|
+
_v1 = @struct.to_ptr
|
4623
|
+
_v2 = _v1.get_uint32(72)
|
4486
4624
|
_v2
|
4487
4625
|
end
|
4488
4626
|
def scan_float=(value)
|
4489
|
-
_v1 =
|
4627
|
+
_v1 = @struct.to_ptr
|
4490
4628
|
_v2 = value
|
4491
|
-
_v1.put_uint32(
|
4629
|
+
_v1.put_uint32(72, _v2)
|
4492
4630
|
end
|
4493
4631
|
def scan_hex
|
4494
|
-
_v1 =
|
4495
|
-
_v2 = _v1.get_uint32(
|
4632
|
+
_v1 = @struct.to_ptr
|
4633
|
+
_v2 = _v1.get_uint32(76)
|
4496
4634
|
_v2
|
4497
4635
|
end
|
4498
4636
|
def scan_hex=(value)
|
4499
|
-
_v1 =
|
4637
|
+
_v1 = @struct.to_ptr
|
4500
4638
|
_v2 = value
|
4501
|
-
_v1.put_uint32(
|
4639
|
+
_v1.put_uint32(76, _v2)
|
4502
4640
|
end
|
4503
4641
|
def scan_hex_dollar
|
4504
|
-
_v1 =
|
4505
|
-
_v2 = _v1.get_uint32(
|
4642
|
+
_v1 = @struct.to_ptr
|
4643
|
+
_v2 = _v1.get_uint32(80)
|
4506
4644
|
_v2
|
4507
4645
|
end
|
4508
4646
|
def scan_hex_dollar=(value)
|
4509
|
-
_v1 =
|
4647
|
+
_v1 = @struct.to_ptr
|
4510
4648
|
_v2 = value
|
4511
|
-
_v1.put_uint32(
|
4649
|
+
_v1.put_uint32(80, _v2)
|
4512
4650
|
end
|
4513
4651
|
def scan_identifier
|
4514
|
-
_v1 =
|
4515
|
-
_v2 = _v1.get_uint32(
|
4652
|
+
_v1 = @struct.to_ptr
|
4653
|
+
_v2 = _v1.get_uint32(48)
|
4516
4654
|
_v2
|
4517
4655
|
end
|
4518
4656
|
def scan_identifier=(value)
|
4519
|
-
_v1 =
|
4657
|
+
_v1 = @struct.to_ptr
|
4520
4658
|
_v2 = value
|
4521
|
-
_v1.put_uint32(
|
4659
|
+
_v1.put_uint32(48, _v2)
|
4522
4660
|
end
|
4523
4661
|
def scan_identifier_1char
|
4524
|
-
_v1 =
|
4525
|
-
_v2 = _v1.get_uint32(
|
4662
|
+
_v1 = @struct.to_ptr
|
4663
|
+
_v2 = _v1.get_uint32(52)
|
4526
4664
|
_v2
|
4527
4665
|
end
|
4528
4666
|
def scan_identifier_1char=(value)
|
4529
|
-
_v1 =
|
4667
|
+
_v1 = @struct.to_ptr
|
4530
4668
|
_v2 = value
|
4531
|
-
_v1.put_uint32(
|
4669
|
+
_v1.put_uint32(52, _v2)
|
4532
4670
|
end
|
4533
4671
|
def scan_identifier_NULL
|
4534
|
-
_v1 =
|
4535
|
-
_v2 = _v1.get_uint32(
|
4672
|
+
_v1 = @struct.to_ptr
|
4673
|
+
_v2 = _v1.get_uint32(56)
|
4536
4674
|
_v2
|
4537
4675
|
end
|
4538
4676
|
def scan_identifier_NULL=(value)
|
4539
|
-
_v1 =
|
4677
|
+
_v1 = @struct.to_ptr
|
4540
4678
|
_v2 = value
|
4541
|
-
_v1.put_uint32(
|
4679
|
+
_v1.put_uint32(56, _v2)
|
4542
4680
|
end
|
4543
4681
|
def scan_octal
|
4544
|
-
_v1 =
|
4545
|
-
_v2 = _v1.get_uint32(
|
4682
|
+
_v1 = @struct.to_ptr
|
4683
|
+
_v2 = _v1.get_uint32(68)
|
4546
4684
|
_v2
|
4547
4685
|
end
|
4548
4686
|
def scan_octal=(value)
|
4549
|
-
_v1 =
|
4687
|
+
_v1 = @struct.to_ptr
|
4550
4688
|
_v2 = value
|
4551
|
-
_v1.put_uint32(
|
4689
|
+
_v1.put_uint32(68, _v2)
|
4552
4690
|
end
|
4553
4691
|
def scan_string_dq
|
4554
|
-
_v1 =
|
4555
|
-
_v2 = _v1.get_uint32(
|
4692
|
+
_v1 = @struct.to_ptr
|
4693
|
+
_v2 = _v1.get_uint32(88)
|
4556
4694
|
_v2
|
4557
4695
|
end
|
4558
4696
|
def scan_string_dq=(value)
|
4559
|
-
_v1 =
|
4697
|
+
_v1 = @struct.to_ptr
|
4560
4698
|
_v2 = value
|
4561
|
-
_v1.put_uint32(
|
4699
|
+
_v1.put_uint32(88, _v2)
|
4562
4700
|
end
|
4563
4701
|
def scan_string_sq
|
4564
|
-
_v1 =
|
4565
|
-
_v2 = _v1.get_uint32(
|
4702
|
+
_v1 = @struct.to_ptr
|
4703
|
+
_v2 = _v1.get_uint32(84)
|
4566
4704
|
_v2
|
4567
4705
|
end
|
4568
4706
|
def scan_string_sq=(value)
|
4569
|
-
_v1 =
|
4707
|
+
_v1 = @struct.to_ptr
|
4570
4708
|
_v2 = value
|
4571
|
-
_v1.put_uint32(
|
4709
|
+
_v1.put_uint32(84, _v2)
|
4572
4710
|
end
|
4573
4711
|
def scan_symbols
|
4574
|
-
_v1 =
|
4575
|
-
_v2 = _v1.get_uint32(
|
4712
|
+
_v1 = @struct.to_ptr
|
4713
|
+
_v2 = _v1.get_uint32(60)
|
4576
4714
|
_v2
|
4577
4715
|
end
|
4578
4716
|
def scan_symbols=(value)
|
4579
|
-
_v1 =
|
4717
|
+
_v1 = @struct.to_ptr
|
4580
4718
|
_v2 = value
|
4581
|
-
_v1.put_uint32(
|
4719
|
+
_v1.put_uint32(60, _v2)
|
4582
4720
|
end
|
4583
4721
|
def scope_0_fallback
|
4584
|
-
_v1 =
|
4585
|
-
_v2 = _v1.get_uint32(
|
4722
|
+
_v1 = @struct.to_ptr
|
4723
|
+
_v2 = _v1.get_uint32(112)
|
4586
4724
|
_v2
|
4587
4725
|
end
|
4588
4726
|
def scope_0_fallback=(value)
|
4589
|
-
_v1 =
|
4727
|
+
_v1 = @struct.to_ptr
|
4590
4728
|
_v2 = value
|
4591
|
-
_v1.put_uint32(
|
4729
|
+
_v1.put_uint32(112, _v2)
|
4592
4730
|
end
|
4593
4731
|
def skip_comment_multi
|
4594
|
-
_v1 =
|
4595
|
-
_v2 = _v1.get_uint32(
|
4732
|
+
_v1 = @struct.to_ptr
|
4733
|
+
_v2 = _v1.get_uint32(36)
|
4596
4734
|
_v2
|
4597
4735
|
end
|
4598
4736
|
def skip_comment_multi=(value)
|
4599
|
-
_v1 =
|
4737
|
+
_v1 = @struct.to_ptr
|
4600
4738
|
_v2 = value
|
4601
|
-
_v1.put_uint32(
|
4739
|
+
_v1.put_uint32(36, _v2)
|
4602
4740
|
end
|
4603
4741
|
def skip_comment_single
|
4604
|
-
_v1 =
|
4605
|
-
_v2 = _v1.get_uint32(
|
4742
|
+
_v1 = @struct.to_ptr
|
4743
|
+
_v2 = _v1.get_uint32(40)
|
4606
4744
|
_v2
|
4607
4745
|
end
|
4608
4746
|
def skip_comment_single=(value)
|
4609
|
-
_v1 =
|
4747
|
+
_v1 = @struct.to_ptr
|
4610
4748
|
_v2 = value
|
4611
|
-
_v1.put_uint32(
|
4749
|
+
_v1.put_uint32(40, _v2)
|
4612
4750
|
end
|
4613
4751
|
def store_int64
|
4614
|
-
_v1 =
|
4615
|
-
_v2 = _v1.get_uint32(
|
4752
|
+
_v1 = @struct.to_ptr
|
4753
|
+
_v2 = _v1.get_uint32(116)
|
4616
4754
|
_v2
|
4617
4755
|
end
|
4618
4756
|
def store_int64=(value)
|
4619
|
-
_v1 =
|
4757
|
+
_v1 = @struct.to_ptr
|
4620
4758
|
_v2 = value
|
4621
|
-
_v1.put_uint32(
|
4759
|
+
_v1.put_uint32(116, _v2)
|
4622
4760
|
end
|
4623
4761
|
def symbol_2_token
|
4624
|
-
_v1 =
|
4625
|
-
_v2 = _v1.get_uint32(
|
4762
|
+
_v1 = @struct.to_ptr
|
4763
|
+
_v2 = _v1.get_uint32(108)
|
4626
4764
|
_v2
|
4627
4765
|
end
|
4628
4766
|
def symbol_2_token=(value)
|
4629
|
-
_v1 =
|
4767
|
+
_v1 = @struct.to_ptr
|
4630
4768
|
_v2 = value
|
4631
|
-
_v1.put_uint32(
|
4769
|
+
_v1.put_uint32(108, _v2)
|
4632
4770
|
end
|
4633
4771
|
end
|
4634
4772
|
# XXX: Don't know how to print callback
|
@@ -4722,6 +4860,10 @@ module GLib
|
|
4722
4860
|
_v3 = GLib::SequenceIter.wrap_copy(_v2)
|
4723
4861
|
return _v3
|
4724
4862
|
end
|
4863
|
+
alias_method 'begin_iter', 'get_begin_iter'
|
4864
|
+
alias_method 'end_iter', 'get_end_iter'
|
4865
|
+
alias_method 'iter_at_pos', 'get_iter_at_pos'
|
4866
|
+
alias_method 'length', 'get_length'
|
4725
4867
|
end
|
4726
4868
|
class GLib::SequenceIter < GirFFI::StructBase
|
4727
4869
|
|
@@ -4763,6 +4905,8 @@ module GLib
|
|
4763
4905
|
_v2 = GLib::SequenceIter.wrap_copy(_v1)
|
4764
4906
|
return _v2
|
4765
4907
|
end
|
4908
|
+
alias_method 'position', 'get_position'
|
4909
|
+
alias_method 'sequence', 'get_sequence'
|
4766
4910
|
end
|
4767
4911
|
# XXX: Don't know how to print callback
|
4768
4912
|
# XXX: Don't know how to print enum
|
@@ -4814,13 +4958,13 @@ module GLib
|
|
4814
4958
|
return _v2
|
4815
4959
|
end
|
4816
4960
|
def callback_data
|
4817
|
-
_v1 =
|
4961
|
+
_v1 = @struct.to_ptr
|
4818
4962
|
_v2 = _v1.get_pointer(0)
|
4819
4963
|
_v2
|
4820
4964
|
end
|
4821
4965
|
def callback_funcs
|
4822
|
-
_v1 =
|
4823
|
-
_v2 = _v1.get_pointer(
|
4966
|
+
_v1 = @struct.to_ptr
|
4967
|
+
_v2 = _v1.get_pointer(8)
|
4824
4968
|
_v3 = GLib::SourceCallbackFuncs.wrap(_v2)
|
4825
4969
|
_v3
|
4826
4970
|
end
|
@@ -4828,8 +4972,8 @@ module GLib
|
|
4828
4972
|
GLib::Lib.g_source_destroy(self)
|
4829
4973
|
end
|
4830
4974
|
def flags
|
4831
|
-
_v1 =
|
4832
|
-
_v2 = _v1.get_uint32(
|
4975
|
+
_v1 = @struct.to_ptr
|
4976
|
+
_v2 = _v1.get_uint32(44)
|
4833
4977
|
_v2
|
4834
4978
|
end
|
4835
4979
|
def get_can_recurse
|
@@ -4876,32 +5020,32 @@ module GLib
|
|
4876
5020
|
GLib::Lib.g_source_modify_unix_fd(self, _v1, _v2)
|
4877
5021
|
end
|
4878
5022
|
def name
|
4879
|
-
_v1 =
|
4880
|
-
_v2 = _v1.get_pointer(
|
5023
|
+
_v1 = @struct.to_ptr
|
5024
|
+
_v2 = _v1.get_pointer(80)
|
4881
5025
|
_v3 = _v2.to_utf8
|
4882
5026
|
_v3
|
4883
5027
|
end
|
4884
5028
|
def next
|
4885
|
-
_v1 =
|
4886
|
-
_v2 = _v1.get_pointer(
|
5029
|
+
_v1 = @struct.to_ptr
|
5030
|
+
_v2 = _v1.get_pointer(72)
|
4887
5031
|
_v3 = GLib::Source.wrap(_v2)
|
4888
5032
|
_v3
|
4889
5033
|
end
|
4890
5034
|
def poll_fds
|
4891
|
-
_v1 =
|
4892
|
-
_v2 = _v1.get_pointer(
|
5035
|
+
_v1 = @struct.to_ptr
|
5036
|
+
_v2 = _v1.get_pointer(56)
|
4893
5037
|
_v3 = GLib::SList.wrap([:pointer, :void], _v2)
|
4894
5038
|
_v3
|
4895
5039
|
end
|
4896
5040
|
def prev
|
4897
|
-
_v1 =
|
4898
|
-
_v2 = _v1.get_pointer(
|
5041
|
+
_v1 = @struct.to_ptr
|
5042
|
+
_v2 = _v1.get_pointer(64)
|
4899
5043
|
_v3 = GLib::Source.wrap(_v2)
|
4900
5044
|
_v3
|
4901
5045
|
end
|
4902
5046
|
def priority
|
4903
|
-
_v1 =
|
4904
|
-
_v2 = _v1.get_int32(
|
5047
|
+
_v1 = @struct.to_ptr
|
5048
|
+
_v2 = _v1.get_int32(40)
|
4905
5049
|
_v2
|
4906
5050
|
end
|
4907
5051
|
def query_unix_fd(tag)
|
@@ -4915,8 +5059,8 @@ module GLib
|
|
4915
5059
|
return _v2
|
4916
5060
|
end
|
4917
5061
|
def ref_count
|
4918
|
-
_v1 =
|
4919
|
-
_v2 = _v1.get_uint32(
|
5062
|
+
_v1 = @struct.to_ptr
|
5063
|
+
_v2 = _v1.get_uint32(24)
|
4920
5064
|
_v2
|
4921
5065
|
end
|
4922
5066
|
def remove_child_source(child_source)
|
@@ -4963,35 +5107,46 @@ module GLib
|
|
4963
5107
|
GLib::Lib.g_source_set_ready_time(self, _v1)
|
4964
5108
|
end
|
4965
5109
|
def source_funcs
|
4966
|
-
_v1 =
|
4967
|
-
_v2 = _v1.get_pointer(
|
5110
|
+
_v1 = @struct.to_ptr
|
5111
|
+
_v2 = _v1.get_pointer(16)
|
4968
5112
|
_v3 = GLib::SourceFuncs.wrap(_v2)
|
4969
5113
|
_v3
|
4970
5114
|
end
|
4971
5115
|
def source_id
|
4972
|
-
_v1 =
|
4973
|
-
_v2 = _v1.get_uint32(
|
5116
|
+
_v1 = @struct.to_ptr
|
5117
|
+
_v2 = _v1.get_uint32(48)
|
4974
5118
|
_v2
|
4975
5119
|
end
|
4976
5120
|
def unref
|
4977
5121
|
GLib::Lib.g_source_unref(self)
|
4978
5122
|
end
|
5123
|
+
alias_method 'can_recurse', 'get_can_recurse'
|
5124
|
+
alias_method 'can_recurse=', 'set_can_recurse'
|
5125
|
+
alias_method 'context', 'get_context'
|
5126
|
+
alias_method 'current_time', 'get_current_time'
|
5127
|
+
alias_method 'funcs=', 'set_funcs'
|
5128
|
+
alias_method 'id', 'get_id'
|
5129
|
+
alias_method 'name=', 'set_name'
|
5130
|
+
alias_method 'priority=', 'set_priority'
|
5131
|
+
alias_method 'ready_time', 'get_ready_time'
|
5132
|
+
alias_method 'ready_time=', 'set_ready_time'
|
5133
|
+
alias_method 'time', 'get_time'
|
4979
5134
|
end
|
4980
5135
|
class GLib::SourceCallbackFuncs < GirFFI::StructBase
|
4981
5136
|
|
4982
5137
|
def get
|
4983
|
-
_v1 =
|
4984
|
-
_v2 = _v1.get_pointer(
|
5138
|
+
_v1 = @struct.to_ptr
|
5139
|
+
_v2 = _v1.get_pointer(16)
|
4985
5140
|
_v2
|
4986
5141
|
end
|
4987
5142
|
def ref
|
4988
|
-
_v1 =
|
5143
|
+
_v1 = @struct.to_ptr
|
4989
5144
|
_v2 = GLib::Ref.get_value_from_pointer(_v1, 0)
|
4990
5145
|
_v2
|
4991
5146
|
end
|
4992
5147
|
def unref
|
4993
|
-
_v1 =
|
4994
|
-
_v2 = GLib::Unref.get_value_from_pointer(_v1,
|
5148
|
+
_v1 = @struct.to_ptr
|
5149
|
+
_v2 = GLib::Unref.get_value_from_pointer(_v1, 8)
|
4995
5150
|
_v2
|
4996
5151
|
end
|
4997
5152
|
end
|
@@ -5000,32 +5155,32 @@ module GLib
|
|
5000
5155
|
class GLib::SourceFuncs < GirFFI::StructBase
|
5001
5156
|
|
5002
5157
|
def check
|
5003
|
-
_v1 =
|
5004
|
-
_v2 = GLib::Check.get_value_from_pointer(_v1,
|
5158
|
+
_v1 = @struct.to_ptr
|
5159
|
+
_v2 = GLib::Check.get_value_from_pointer(_v1, 8)
|
5005
5160
|
_v2
|
5006
5161
|
end
|
5007
5162
|
def closure_callback
|
5008
|
-
_v1 =
|
5009
|
-
_v2 = GLib::SourceFunc.get_value_from_pointer(_v1,
|
5163
|
+
_v1 = @struct.to_ptr
|
5164
|
+
_v2 = GLib::SourceFunc.get_value_from_pointer(_v1, 32)
|
5010
5165
|
_v2
|
5011
5166
|
end
|
5012
5167
|
def closure_marshal
|
5013
|
-
_v1 =
|
5014
|
-
_v2 = GLib::SourceDummyMarshal.get_value_from_pointer(_v1,
|
5168
|
+
_v1 = @struct.to_ptr
|
5169
|
+
_v2 = GLib::SourceDummyMarshal.get_value_from_pointer(_v1, 40)
|
5015
5170
|
_v2
|
5016
5171
|
end
|
5017
5172
|
def dispatch
|
5018
|
-
_v1 =
|
5019
|
-
_v2 = _v1.get_pointer(
|
5173
|
+
_v1 = @struct.to_ptr
|
5174
|
+
_v2 = _v1.get_pointer(16)
|
5020
5175
|
_v2
|
5021
5176
|
end
|
5022
5177
|
def finalize
|
5023
|
-
_v1 =
|
5024
|
-
_v2 = GLib::Finalize.get_value_from_pointer(_v1,
|
5178
|
+
_v1 = @struct.to_ptr
|
5179
|
+
_v2 = GLib::Finalize.get_value_from_pointer(_v1, 24)
|
5025
5180
|
_v2
|
5026
5181
|
end
|
5027
5182
|
def prepare
|
5028
|
-
_v1 =
|
5183
|
+
_v1 = @struct.to_ptr
|
5029
5184
|
_v2 = GLib::Prepare.get_value_from_pointer(_v1, 0)
|
5030
5185
|
_v2
|
5031
5186
|
end
|
@@ -5044,14 +5199,14 @@ module GLib
|
|
5044
5199
|
class GLib::String < GirFFI::BoxedBase
|
5045
5200
|
|
5046
5201
|
def allocated_len
|
5047
|
-
_v1 =
|
5048
|
-
_v2 = _v1.get_uint64(
|
5202
|
+
_v1 = @struct.to_ptr
|
5203
|
+
_v2 = _v1.get_uint64(16)
|
5049
5204
|
_v2
|
5050
5205
|
end
|
5051
5206
|
def allocated_len=(value)
|
5052
|
-
_v1 =
|
5207
|
+
_v1 = @struct.to_ptr
|
5053
5208
|
_v2 = value
|
5054
|
-
_v1.put_uint64(
|
5209
|
+
_v1.put_uint64(16, _v2)
|
5055
5210
|
end
|
5056
5211
|
def append(val)
|
5057
5212
|
_v1 = GirFFI::InPointer.from_utf8(val)
|
@@ -5121,12 +5276,12 @@ module GLib
|
|
5121
5276
|
end
|
5122
5277
|
def free(free_segment)
|
5123
5278
|
_v1 = free_segment
|
5124
|
-
_v2 = GLib::Lib.g_string_free(self
|
5279
|
+
_v2 = GLib::Lib.g_string_free(self, _v1)
|
5125
5280
|
_v3 = GirFFI::AllocationHelper.free_after(_v2, &:to_utf8)
|
5126
5281
|
return _v3
|
5127
5282
|
end
|
5128
5283
|
def free_to_bytes
|
5129
|
-
_v1 = GLib::Lib.g_string_free_to_bytes(self
|
5284
|
+
_v1 = GLib::Lib.g_string_free_to_bytes(self)
|
5130
5285
|
_v2 = GLib::Bytes.wrap_own(_v1)
|
5131
5286
|
return _v2
|
5132
5287
|
end
|
@@ -5164,14 +5319,14 @@ module GLib
|
|
5164
5319
|
return _v4
|
5165
5320
|
end
|
5166
5321
|
def len
|
5167
|
-
_v1 =
|
5168
|
-
_v2 = _v1.get_uint64(
|
5322
|
+
_v1 = @struct.to_ptr
|
5323
|
+
_v2 = _v1.get_uint64(8)
|
5169
5324
|
_v2
|
5170
5325
|
end
|
5171
5326
|
def len=(value)
|
5172
|
-
_v1 =
|
5327
|
+
_v1 = @struct.to_ptr
|
5173
5328
|
_v2 = value
|
5174
|
-
_v1.put_uint64(
|
5329
|
+
_v1.put_uint64(8, _v2)
|
5175
5330
|
end
|
5176
5331
|
def overwrite(pos, val)
|
5177
5332
|
_v1 = pos
|
@@ -5220,13 +5375,13 @@ module GLib
|
|
5220
5375
|
return _v3
|
5221
5376
|
end
|
5222
5377
|
def str
|
5223
|
-
_v1 =
|
5378
|
+
_v1 = @struct.to_ptr
|
5224
5379
|
_v2 = _v1.get_pointer(0)
|
5225
5380
|
_v3 = _v2.to_utf8
|
5226
5381
|
_v3
|
5227
5382
|
end
|
5228
5383
|
def str=(value)
|
5229
|
-
_v1 =
|
5384
|
+
_v1 = @struct.to_ptr
|
5230
5385
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
5231
5386
|
_v1.put_pointer(0, _v2)
|
5232
5387
|
end
|
@@ -5241,6 +5396,7 @@ module GLib
|
|
5241
5396
|
_v2 = GLib::String.wrap_copy(_v1)
|
5242
5397
|
return _v2
|
5243
5398
|
end
|
5399
|
+
alias_method 'size=', 'set_size'
|
5244
5400
|
end
|
5245
5401
|
class GLib::StringChunk < GirFFI::StructBase
|
5246
5402
|
|
@@ -5270,6 +5426,7 @@ module GLib
|
|
5270
5426
|
return _v4
|
5271
5427
|
end
|
5272
5428
|
end
|
5429
|
+
TEST_OPTION_ISOLATE_DIRS = "isolate_dirs"
|
5273
5430
|
TIME_SPAN_DAY = 86400000000
|
5274
5431
|
TIME_SPAN_HOUR = 3600000000
|
5275
5432
|
TIME_SPAN_MILLISECOND = 1000
|
@@ -5282,64 +5439,64 @@ module GLib
|
|
5282
5439
|
class GLib::TestConfig < GirFFI::StructBase
|
5283
5440
|
|
5284
5441
|
def test_initialized
|
5285
|
-
_v1 =
|
5442
|
+
_v1 = @struct.to_ptr
|
5286
5443
|
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 0)
|
5287
5444
|
_v2
|
5288
5445
|
end
|
5289
5446
|
def test_initialized=(value)
|
5290
|
-
_v1 =
|
5447
|
+
_v1 = @struct.to_ptr
|
5291
5448
|
_v2 = value
|
5292
5449
|
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1)
|
5293
5450
|
end
|
5294
5451
|
def test_perf
|
5295
|
-
_v1 =
|
5296
|
-
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1,
|
5452
|
+
_v1 = @struct.to_ptr
|
5453
|
+
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 8)
|
5297
5454
|
_v2
|
5298
5455
|
end
|
5299
5456
|
def test_perf=(value)
|
5300
|
-
_v1 =
|
5457
|
+
_v1 = @struct.to_ptr
|
5301
5458
|
_v2 = value
|
5302
|
-
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1)
|
5459
|
+
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1, 8)
|
5303
5460
|
end
|
5304
5461
|
def test_quick
|
5305
|
-
_v1 =
|
5306
|
-
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1,
|
5462
|
+
_v1 = @struct.to_ptr
|
5463
|
+
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 4)
|
5307
5464
|
_v2
|
5308
5465
|
end
|
5309
5466
|
def test_quick=(value)
|
5310
|
-
_v1 =
|
5467
|
+
_v1 = @struct.to_ptr
|
5311
5468
|
_v2 = value
|
5312
|
-
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1)
|
5469
|
+
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1, 4)
|
5313
5470
|
end
|
5314
5471
|
def test_quiet
|
5315
|
-
_v1 =
|
5316
|
-
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1,
|
5472
|
+
_v1 = @struct.to_ptr
|
5473
|
+
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 16)
|
5317
5474
|
_v2
|
5318
5475
|
end
|
5319
5476
|
def test_quiet=(value)
|
5320
|
-
_v1 =
|
5477
|
+
_v1 = @struct.to_ptr
|
5321
5478
|
_v2 = value
|
5322
|
-
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1)
|
5479
|
+
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1, 16)
|
5323
5480
|
end
|
5324
5481
|
def test_undefined
|
5325
|
-
_v1 =
|
5326
|
-
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1,
|
5482
|
+
_v1 = @struct.to_ptr
|
5483
|
+
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 20)
|
5327
5484
|
_v2
|
5328
5485
|
end
|
5329
5486
|
def test_undefined=(value)
|
5330
|
-
_v1 =
|
5487
|
+
_v1 = @struct.to_ptr
|
5331
5488
|
_v2 = value
|
5332
|
-
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1)
|
5489
|
+
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1, 20)
|
5333
5490
|
end
|
5334
5491
|
def test_verbose
|
5335
|
-
_v1 =
|
5336
|
-
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1,
|
5492
|
+
_v1 = @struct.to_ptr
|
5493
|
+
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 12)
|
5337
5494
|
_v2
|
5338
5495
|
end
|
5339
5496
|
def test_verbose=(value)
|
5340
|
-
_v1 =
|
5497
|
+
_v1 = @struct.to_ptr
|
5341
5498
|
_v2 = value
|
5342
|
-
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1)
|
5499
|
+
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1, 12)
|
5343
5500
|
end
|
5344
5501
|
end
|
5345
5502
|
# XXX: Don't know how to print callback
|
@@ -5349,7 +5506,7 @@ module GLib
|
|
5349
5506
|
class GLib::TestLogBuffer < GirFFI::StructBase
|
5350
5507
|
|
5351
5508
|
def data
|
5352
|
-
_v1 =
|
5509
|
+
_v1 = @struct.to_ptr
|
5353
5510
|
_v2 = _v1.get_pointer(0)
|
5354
5511
|
_v3 = GLib::String.wrap(_v2)
|
5355
5512
|
_v3
|
@@ -5358,8 +5515,8 @@ module GLib
|
|
5358
5515
|
GLib::Lib.g_test_log_buffer_free(self)
|
5359
5516
|
end
|
5360
5517
|
def msgs
|
5361
|
-
_v1 =
|
5362
|
-
_v2 = _v1.get_pointer(
|
5518
|
+
_v1 = @struct.to_ptr
|
5519
|
+
_v2 = _v1.get_pointer(8)
|
5363
5520
|
_v3 = GLib::SList.wrap([:pointer, :void], _v2)
|
5364
5521
|
_v3
|
5365
5522
|
end
|
@@ -5376,55 +5533,55 @@ module GLib
|
|
5376
5533
|
GLib::Lib.g_test_log_msg_free(self)
|
5377
5534
|
end
|
5378
5535
|
def log_type
|
5379
|
-
_v1 =
|
5536
|
+
_v1 = @struct.to_ptr
|
5380
5537
|
_v2 = GLib::TestLogType.get_value_from_pointer(_v1, 0)
|
5381
5538
|
_v2
|
5382
5539
|
end
|
5383
5540
|
def log_type=(value)
|
5384
|
-
_v1 =
|
5541
|
+
_v1 = @struct.to_ptr
|
5385
5542
|
_v2 = value
|
5386
5543
|
GLib::TestLogType.copy_value_to_pointer(_v2, _v1)
|
5387
5544
|
end
|
5388
5545
|
def n_nums
|
5389
|
-
_v1 =
|
5390
|
-
_v2 = _v1.get_uint32(
|
5546
|
+
_v1 = @struct.to_ptr
|
5547
|
+
_v2 = _v1.get_uint32(16)
|
5391
5548
|
_v2
|
5392
5549
|
end
|
5393
5550
|
def n_nums=(value)
|
5394
|
-
_v1 =
|
5551
|
+
_v1 = @struct.to_ptr
|
5395
5552
|
_v2 = value
|
5396
|
-
_v1.put_uint32(
|
5553
|
+
_v1.put_uint32(16, _v2)
|
5397
5554
|
end
|
5398
5555
|
def n_strings
|
5399
|
-
_v1 =
|
5400
|
-
_v2 = _v1.get_uint32(
|
5556
|
+
_v1 = @struct.to_ptr
|
5557
|
+
_v2 = _v1.get_uint32(4)
|
5401
5558
|
_v2
|
5402
5559
|
end
|
5403
5560
|
def n_strings=(value)
|
5404
|
-
_v1 =
|
5561
|
+
_v1 = @struct.to_ptr
|
5405
5562
|
_v2 = value
|
5406
|
-
_v1.put_uint32(
|
5563
|
+
_v1.put_uint32(4, _v2)
|
5407
5564
|
end
|
5408
5565
|
def nums
|
5409
|
-
_v1 =
|
5410
|
-
_v2 = _v1.get_pointer(
|
5566
|
+
_v1 = @struct.to_ptr
|
5567
|
+
_v2 = _v1.get_pointer(24)
|
5411
5568
|
_v2
|
5412
5569
|
end
|
5413
5570
|
def nums=(value)
|
5414
|
-
_v1 =
|
5571
|
+
_v1 = @struct.to_ptr
|
5415
5572
|
_v2 = value
|
5416
|
-
_v1.put_pointer(
|
5573
|
+
_v1.put_pointer(24, _v2)
|
5417
5574
|
end
|
5418
5575
|
def strings
|
5419
|
-
_v1 =
|
5420
|
-
_v2 = _v1.get_pointer(
|
5576
|
+
_v1 = @struct.to_ptr
|
5577
|
+
_v2 = _v1.get_pointer(8)
|
5421
5578
|
_v3 = _v2.to_utf8
|
5422
5579
|
_v3
|
5423
5580
|
end
|
5424
5581
|
def strings=(value)
|
5425
|
-
_v1 =
|
5582
|
+
_v1 = @struct.to_ptr
|
5426
5583
|
_v2 = GirFFI::InPointer.from_utf8(value)
|
5427
|
-
_v1.put_pointer(
|
5584
|
+
_v1.put_pointer(8, _v2)
|
5428
5585
|
end
|
5429
5586
|
end
|
5430
5587
|
# XXX: Don't know how to print enum
|
@@ -5499,14 +5656,14 @@ module GLib
|
|
5499
5656
|
GLib::Lib.g_thread_pool_stop_unused_threads
|
5500
5657
|
end
|
5501
5658
|
def exclusive
|
5502
|
-
_v1 =
|
5503
|
-
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1,
|
5659
|
+
_v1 = @struct.to_ptr
|
5660
|
+
_v2 = GirFFI::Boolean.get_value_from_pointer(_v1, 16)
|
5504
5661
|
_v2
|
5505
5662
|
end
|
5506
5663
|
def exclusive=(value)
|
5507
|
-
_v1 =
|
5664
|
+
_v1 = @struct.to_ptr
|
5508
5665
|
_v2 = value
|
5509
|
-
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1)
|
5666
|
+
GirFFI::Boolean.copy_value_to_pointer(_v2, _v1, 16)
|
5510
5667
|
end
|
5511
5668
|
def free(immediate, wait_)
|
5512
5669
|
_v1 = immediate
|
@@ -5514,12 +5671,12 @@ module GLib
|
|
5514
5671
|
GLib::Lib.g_thread_pool_free(self, _v1, _v2)
|
5515
5672
|
end
|
5516
5673
|
def func
|
5517
|
-
_v1 =
|
5674
|
+
_v1 = @struct.to_ptr
|
5518
5675
|
_v2 = GLib::Func.get_value_from_pointer(_v1, 0)
|
5519
5676
|
_v2
|
5520
5677
|
end
|
5521
5678
|
def func=(value)
|
5522
|
-
_v1 =
|
5679
|
+
_v1 = @struct.to_ptr
|
5523
5680
|
_v2 = GLib::Func.from(value)
|
5524
5681
|
GLib::Func.copy_value_to_pointer(_v2, _v1)
|
5525
5682
|
end
|
@@ -5555,15 +5712,18 @@ module GLib
|
|
5555
5712
|
return _v1
|
5556
5713
|
end
|
5557
5714
|
def user_data
|
5558
|
-
_v1 =
|
5559
|
-
_v2 = _v1.get_pointer(
|
5715
|
+
_v1 = @struct.to_ptr
|
5716
|
+
_v2 = _v1.get_pointer(8)
|
5560
5717
|
_v2
|
5561
5718
|
end
|
5562
5719
|
def user_data=(value)
|
5563
|
-
_v1 =
|
5720
|
+
_v1 = @struct.to_ptr
|
5564
5721
|
_v2 = value
|
5565
|
-
_v1.put_pointer(
|
5722
|
+
_v1.put_pointer(8, _v2)
|
5566
5723
|
end
|
5724
|
+
alias_method 'max_threads', 'get_max_threads'
|
5725
|
+
alias_method 'max_threads=', 'set_max_threads'
|
5726
|
+
alias_method 'num_threads', 'get_num_threads'
|
5567
5727
|
end
|
5568
5728
|
# XXX: Don't know how to print enum
|
5569
5729
|
class GLib::TimeVal < GirFFI::StructBase
|
@@ -5583,24 +5743,24 @@ module GLib
|
|
5583
5743
|
return _v2
|
5584
5744
|
end
|
5585
5745
|
def tv_sec
|
5586
|
-
_v1 =
|
5746
|
+
_v1 = @struct.to_ptr
|
5587
5747
|
_v2 = _v1.get_int64(0)
|
5588
5748
|
_v2
|
5589
5749
|
end
|
5590
5750
|
def tv_sec=(value)
|
5591
|
-
_v1 =
|
5751
|
+
_v1 = @struct.to_ptr
|
5592
5752
|
_v2 = value
|
5593
5753
|
_v1.put_int64(0, _v2)
|
5594
5754
|
end
|
5595
5755
|
def tv_usec
|
5596
|
-
_v1 =
|
5597
|
-
_v2 = _v1.get_int64(
|
5756
|
+
_v1 = @struct.to_ptr
|
5757
|
+
_v2 = _v1.get_int64(8)
|
5598
5758
|
_v2
|
5599
5759
|
end
|
5600
5760
|
def tv_usec=(value)
|
5601
|
-
_v1 =
|
5761
|
+
_v1 = @struct.to_ptr
|
5602
5762
|
_v2 = value
|
5603
|
-
_v1.put_int64(
|
5763
|
+
_v1.put_int64(8, _v2)
|
5604
5764
|
end
|
5605
5765
|
end
|
5606
5766
|
class GLib::TimeZone < GirFFI::BoxedBase
|
@@ -5684,6 +5844,9 @@ module GLib
|
|
5684
5844
|
def unref
|
5685
5845
|
GLib::Lib.g_time_zone_unref(self)
|
5686
5846
|
end
|
5847
|
+
alias_method 'abbreviation', 'get_abbreviation'
|
5848
|
+
alias_method 'identifier', 'get_identifier'
|
5849
|
+
alias_method 'offset', 'get_offset'
|
5687
5850
|
end
|
5688
5851
|
class GLib::Timer < GirFFI::StructBase
|
5689
5852
|
|
@@ -5733,13 +5896,13 @@ module GLib
|
|
5733
5896
|
GLib::Lib.g_trash_stack_push(_v1, _v2)
|
5734
5897
|
end
|
5735
5898
|
def next
|
5736
|
-
_v1 =
|
5899
|
+
_v1 = @struct.to_ptr
|
5737
5900
|
_v2 = _v1.get_pointer(0)
|
5738
5901
|
_v3 = GLib::TrashStack.wrap(_v2)
|
5739
5902
|
_v3
|
5740
5903
|
end
|
5741
5904
|
def next=(value)
|
5742
|
-
_v1 =
|
5905
|
+
_v1 = @struct.to_ptr
|
5743
5906
|
_v2 = GLib::TrashStack.copy_from(value)
|
5744
5907
|
_v1.put_pointer(0, _v2)
|
5745
5908
|
end
|
@@ -5766,12 +5929,14 @@ module GLib
|
|
5766
5929
|
_v2 = GLib::Lib.g_tree_lookup(self, _v1)
|
5767
5930
|
return _v2
|
5768
5931
|
end
|
5769
|
-
def lookup_extended(lookup_key = nil
|
5932
|
+
def lookup_extended(lookup_key = nil)
|
5770
5933
|
_v1 = lookup_key
|
5771
|
-
_v2 =
|
5772
|
-
_v3 =
|
5934
|
+
_v2 = FFI::MemoryPointer.new(:pointer)
|
5935
|
+
_v3 = FFI::MemoryPointer.new(:pointer)
|
5773
5936
|
_v4 = GLib::Lib.g_tree_lookup_extended(self, _v1, _v2, _v3)
|
5774
|
-
|
5937
|
+
_v5 = _v2.get_pointer(0)
|
5938
|
+
_v6 = _v3.get_pointer(0)
|
5939
|
+
return [_v4, _v5, _v6]
|
5775
5940
|
end
|
5776
5941
|
def nnodes
|
5777
5942
|
_v1 = GLib::Lib.g_tree_nnodes(self)
|
@@ -6411,8 +6576,32 @@ module GLib
|
|
6411
6576
|
def unref
|
6412
6577
|
GLib::Lib.g_variant_unref(self)
|
6413
6578
|
end
|
6579
|
+
alias_method 'boolean', 'get_boolean'
|
6580
|
+
alias_method 'byte', 'get_byte'
|
6581
|
+
alias_method 'bytestring', 'get_bytestring'
|
6582
|
+
alias_method 'bytestring_array', 'get_bytestring_array'
|
6583
|
+
alias_method 'child_value', 'get_child_value'
|
6584
|
+
alias_method 'data', 'get_data'
|
6585
|
+
alias_method 'data_as_bytes', 'get_data_as_bytes'
|
6586
|
+
alias_method 'double', 'get_double'
|
6414
6587
|
alias_method 'get_string', 'get_string_with_override'
|
6415
6588
|
alias_method 'get_string_without_override', 'get_string'
|
6589
|
+
alias_method 'handle', 'get_handle'
|
6590
|
+
alias_method 'int16', 'get_int16'
|
6591
|
+
alias_method 'int32', 'get_int32'
|
6592
|
+
alias_method 'int64', 'get_int64'
|
6593
|
+
alias_method 'maybe', 'get_maybe'
|
6594
|
+
alias_method 'normal_form', 'get_normal_form'
|
6595
|
+
alias_method 'objv', 'get_objv'
|
6596
|
+
alias_method 'size', 'get_size'
|
6597
|
+
alias_method 'string', 'get_string'
|
6598
|
+
alias_method 'strv', 'get_strv'
|
6599
|
+
alias_method 'type', 'get_type'
|
6600
|
+
alias_method 'type_string', 'get_type_string'
|
6601
|
+
alias_method 'uint16', 'get_uint16'
|
6602
|
+
alias_method 'uint32', 'get_uint32'
|
6603
|
+
alias_method 'uint64', 'get_uint64'
|
6604
|
+
alias_method 'variant', 'get_variant'
|
6416
6605
|
end
|
6417
6606
|
class GLib::VariantBuilder < GirFFI::BoxedBase
|
6418
6607
|
def self.new(*args, &block)
|
@@ -6442,7 +6631,7 @@ module GLib
|
|
6442
6631
|
return _v2
|
6443
6632
|
end
|
6444
6633
|
def unref
|
6445
|
-
GLib::Lib.g_variant_builder_unref(self
|
6634
|
+
GLib::Lib.g_variant_builder_unref(self)
|
6446
6635
|
end
|
6447
6636
|
end
|
6448
6637
|
# XXX: Don't know how to print enum
|
@@ -6488,7 +6677,7 @@ module GLib
|
|
6488
6677
|
return _v2
|
6489
6678
|
end
|
6490
6679
|
def unref
|
6491
|
-
GLib::Lib.g_variant_dict_unref(self
|
6680
|
+
GLib::Lib.g_variant_dict_unref(self)
|
6492
6681
|
end
|
6493
6682
|
end
|
6494
6683
|
# XXX: Don't know how to print enum
|
@@ -6528,6 +6717,11 @@ module GLib
|
|
6528
6717
|
obj.__send__(:initialize_tuple, *args, &block)
|
6529
6718
|
obj
|
6530
6719
|
end
|
6720
|
+
def self.string_get_depth_(type_string)
|
6721
|
+
_v1 = GirFFI::InPointer.from_utf8(type_string)
|
6722
|
+
_v2 = GLib::Lib.g_variant_type_string_get_depth_(_v1)
|
6723
|
+
return _v2
|
6724
|
+
end
|
6531
6725
|
def self.string_is_valid(type_string)
|
6532
6726
|
_v1 = GirFFI::InPointer.from_utf8(type_string)
|
6533
6727
|
_v2 = GLib::Lib.g_variant_type_string_is_valid(_v1)
|
@@ -6660,6 +6854,7 @@ module GLib
|
|
6660
6854
|
_v2 = GLib::VariantType.wrap_copy(_v1)
|
6661
6855
|
return _v2
|
6662
6856
|
end
|
6857
|
+
alias_method 'string_length', 'get_string_length'
|
6663
6858
|
end
|
6664
6859
|
# XXX: Don't know how to print callback
|
6665
6860
|
WIN32_MSG_HANDLE = 19981206
|
@@ -6954,6 +7149,25 @@ module GLib
|
|
6954
7149
|
_v2 = GLib::DestroyNotify.from(clear_func)
|
6955
7150
|
GLib::Lib.g_atomic_rc_box_release_full(_v1, _v2)
|
6956
7151
|
end
|
7152
|
+
def self.atomic_ref_count_compare(arc, val)
|
7153
|
+
_v1 = arc
|
7154
|
+
_v2 = val
|
7155
|
+
_v3 = GLib::Lib.g_atomic_ref_count_compare(_v1, _v2)
|
7156
|
+
return _v3
|
7157
|
+
end
|
7158
|
+
def self.atomic_ref_count_dec(arc)
|
7159
|
+
_v1 = arc
|
7160
|
+
_v2 = GLib::Lib.g_atomic_ref_count_dec(_v1)
|
7161
|
+
return _v2
|
7162
|
+
end
|
7163
|
+
def self.atomic_ref_count_inc(arc)
|
7164
|
+
_v1 = arc
|
7165
|
+
GLib::Lib.g_atomic_ref_count_inc(_v1)
|
7166
|
+
end
|
7167
|
+
def self.atomic_ref_count_init(arc)
|
7168
|
+
_v1 = arc
|
7169
|
+
GLib::Lib.g_atomic_ref_count_init(_v1)
|
7170
|
+
end
|
6957
7171
|
def self.base64_decode(text)
|
6958
7172
|
_v1 = GirFFI::InPointer.from_utf8(text)
|
6959
7173
|
_v2 = FFI::MemoryPointer.new(:uint64)
|
@@ -6973,7 +7187,7 @@ module GLib
|
|
6973
7187
|
_v5 = GirFFI::SizedArray.wrap(:guint8, _v4, _v2.get_pointer(0))
|
6974
7188
|
return [_v3, _v5]
|
6975
7189
|
end
|
6976
|
-
def self.base64_encode(data)
|
7190
|
+
def self.base64_encode(data = nil)
|
6977
7191
|
len = data.nil? ? (0) : (data.length)
|
6978
7192
|
_v1 = len
|
6979
7193
|
_v2 = GirFFI::SizedArray.from(:guint8, -1, data)
|
@@ -8375,6 +8589,25 @@ module GLib
|
|
8375
8589
|
_v4 = GLib::Lib.g_realloc_n(_v1, _v2, _v3)
|
8376
8590
|
return _v4
|
8377
8591
|
end
|
8592
|
+
def self.ref_count_compare(rc, val)
|
8593
|
+
_v1 = rc
|
8594
|
+
_v2 = val
|
8595
|
+
_v3 = GLib::Lib.g_ref_count_compare(_v1, _v2)
|
8596
|
+
return _v3
|
8597
|
+
end
|
8598
|
+
def self.ref_count_dec(rc)
|
8599
|
+
_v1 = rc
|
8600
|
+
_v2 = GLib::Lib.g_ref_count_dec(_v1)
|
8601
|
+
return _v2
|
8602
|
+
end
|
8603
|
+
def self.ref_count_inc(rc)
|
8604
|
+
_v1 = rc
|
8605
|
+
GLib::Lib.g_ref_count_inc(_v1)
|
8606
|
+
end
|
8607
|
+
def self.ref_count_init(rc)
|
8608
|
+
_v1 = rc
|
8609
|
+
GLib::Lib.g_ref_count_init(_v1)
|
8610
|
+
end
|
8378
8611
|
def self.ref_string_acquire(str)
|
8379
8612
|
_v1 = GirFFI::InPointer.from_utf8(str)
|
8380
8613
|
_v2 = GLib::Lib.g_ref_string_acquire(_v1)
|
@@ -8996,6 +9229,12 @@ module GLib
|
|
8996
9229
|
_v3 = GLib::Lib.g_strv_contains(_v1, _v2)
|
8997
9230
|
return _v3
|
8998
9231
|
end
|
9232
|
+
def self.strv_equal(strv1, strv2)
|
9233
|
+
_v1 = GirFFI::InPointer.from_utf8(strv1)
|
9234
|
+
_v2 = GirFFI::InPointer.from_utf8(strv2)
|
9235
|
+
_v3 = GLib::Lib.g_strv_equal(_v1, _v2)
|
9236
|
+
return _v3
|
9237
|
+
end
|
8999
9238
|
def self.strv_get_type
|
9000
9239
|
_v1 = GLib::Lib.g_strv_get_type
|
9001
9240
|
return _v1
|
@@ -9321,32 +9560,36 @@ module GLib
|
|
9321
9560
|
_v2 = GLib::Lib.g_unichar_combining_class(_v1)
|
9322
9561
|
return _v2
|
9323
9562
|
end
|
9324
|
-
def self.unichar_compose(a, b
|
9563
|
+
def self.unichar_compose(a, b)
|
9325
9564
|
_v1 = a
|
9326
9565
|
_v2 = b
|
9327
|
-
_v3 =
|
9566
|
+
_v3 = FFI::MemoryPointer.new(:uint32)
|
9328
9567
|
_v4 = GLib::Lib.g_unichar_compose(_v1, _v2, _v3)
|
9329
|
-
|
9568
|
+
_v5 = _v3.get_uint32(0)
|
9569
|
+
return [_v4, _v5]
|
9330
9570
|
end
|
9331
|
-
def self.unichar_decompose(ch
|
9571
|
+
def self.unichar_decompose(ch)
|
9332
9572
|
_v1 = ch
|
9333
|
-
_v2 =
|
9334
|
-
_v3 =
|
9573
|
+
_v2 = FFI::MemoryPointer.new(:uint32)
|
9574
|
+
_v3 = FFI::MemoryPointer.new(:uint32)
|
9335
9575
|
_v4 = GLib::Lib.g_unichar_decompose(_v1, _v2, _v3)
|
9336
|
-
|
9576
|
+
_v5 = _v2.get_uint32(0)
|
9577
|
+
_v6 = _v3.get_uint32(0)
|
9578
|
+
return [_v4, _v5, _v6]
|
9337
9579
|
end
|
9338
9580
|
def self.unichar_digit_value(c)
|
9339
9581
|
_v1 = c
|
9340
9582
|
_v2 = GLib::Lib.g_unichar_digit_value(_v1)
|
9341
9583
|
return _v2
|
9342
9584
|
end
|
9343
|
-
def self.unichar_fully_decompose(ch, compat,
|
9585
|
+
def self.unichar_fully_decompose(ch, compat, result_len)
|
9344
9586
|
_v1 = ch
|
9345
9587
|
_v2 = compat
|
9346
|
-
_v3 =
|
9588
|
+
_v3 = FFI::MemoryPointer.new(:uint32)
|
9347
9589
|
_v4 = result_len
|
9348
9590
|
_v5 = GLib::Lib.g_unichar_fully_decompose(_v1, _v2, _v3, _v4)
|
9349
|
-
|
9591
|
+
_v6 = _v3.get_uint32(0)
|
9592
|
+
return [_v5, _v6]
|
9350
9593
|
end
|
9351
9594
|
def self.unichar_get_mirror_char(ch, mirrored_ch)
|
9352
9595
|
_v1 = ch
|
@@ -9658,14 +9901,14 @@ module GLib
|
|
9658
9901
|
_v1 = GirFFI::InPointer.from_utf8(p)
|
9659
9902
|
_v2 = GirFFI::InPointer.from_utf8(end_)
|
9660
9903
|
_v3 = GLib::Lib.g_utf8_find_next_char(_v1, _v2)
|
9661
|
-
_v4 =
|
9904
|
+
_v4 = _v3.to_utf8
|
9662
9905
|
return _v4
|
9663
9906
|
end
|
9664
9907
|
def self.utf8_find_prev_char(str, p)
|
9665
9908
|
_v1 = GirFFI::InPointer.from_utf8(str)
|
9666
9909
|
_v2 = GirFFI::InPointer.from_utf8(p)
|
9667
9910
|
_v3 = GLib::Lib.g_utf8_find_prev_char(_v1, _v2)
|
9668
|
-
_v4 =
|
9911
|
+
_v4 = _v3.to_utf8
|
9669
9912
|
return _v4
|
9670
9913
|
end
|
9671
9914
|
def self.utf8_get_char(p)
|
@@ -9698,7 +9941,7 @@ module GLib
|
|
9698
9941
|
_v1 = GirFFI::InPointer.from_utf8(str)
|
9699
9942
|
_v2 = offset
|
9700
9943
|
_v3 = GLib::Lib.g_utf8_offset_to_pointer(_v1, _v2)
|
9701
|
-
_v4 =
|
9944
|
+
_v4 = _v3.to_utf8
|
9702
9945
|
return _v4
|
9703
9946
|
end
|
9704
9947
|
def self.utf8_pointer_to_offset(str, pos)
|
@@ -9710,7 +9953,7 @@ module GLib
|
|
9710
9953
|
def self.utf8_prev_char(p)
|
9711
9954
|
_v1 = GirFFI::InPointer.from_utf8(p)
|
9712
9955
|
_v2 = GLib::Lib.g_utf8_prev_char(_v1)
|
9713
|
-
_v3 =
|
9956
|
+
_v3 = _v2.to_utf8
|
9714
9957
|
return _v3
|
9715
9958
|
end
|
9716
9959
|
def self.utf8_strchr(p, len, c)
|
@@ -9718,7 +9961,7 @@ module GLib
|
|
9718
9961
|
_v2 = len
|
9719
9962
|
_v3 = c
|
9720
9963
|
_v4 = GLib::Lib.g_utf8_strchr(_v1, _v2, _v3)
|
9721
|
-
_v5 =
|
9964
|
+
_v5 = _v4.to_utf8
|
9722
9965
|
return _v5
|
9723
9966
|
end
|
9724
9967
|
def self.utf8_strdown(str, len)
|
@@ -9739,7 +9982,7 @@ module GLib
|
|
9739
9982
|
_v2 = GirFFI::InPointer.from_utf8(src)
|
9740
9983
|
_v3 = n
|
9741
9984
|
_v4 = GLib::Lib.g_utf8_strncpy(_v1, _v2, _v3)
|
9742
|
-
_v5 =
|
9985
|
+
_v5 = _v4.to_utf8
|
9743
9986
|
return _v5
|
9744
9987
|
end
|
9745
9988
|
def self.utf8_strrchr(p, len, c)
|
@@ -9747,7 +9990,7 @@ module GLib
|
|
9747
9990
|
_v2 = len
|
9748
9991
|
_v3 = c
|
9749
9992
|
_v4 = GLib::Lib.g_utf8_strrchr(_v1, _v2, _v3)
|
9750
|
-
_v5 =
|
9993
|
+
_v5 = _v4.to_utf8
|
9751
9994
|
return _v5
|
9752
9995
|
end
|
9753
9996
|
def self.utf8_strreverse(str, len)
|
@@ -9813,6 +10056,15 @@ module GLib
|
|
9813
10056
|
_v5 = _v2.get_pointer(0).to_utf8
|
9814
10057
|
return [_v4, _v5]
|
9815
10058
|
end
|
10059
|
+
def self.utf8_validate_len(str)
|
10060
|
+
max_len = str.nil? ? (0) : (str.length)
|
10061
|
+
_v1 = max_len
|
10062
|
+
_v2 = FFI::MemoryPointer.new(:pointer)
|
10063
|
+
_v3 = GirFFI::SizedArray.from(:guint8, -1, str)
|
10064
|
+
_v4 = GLib::Lib.g_utf8_validate_len(_v3, _v1, _v2)
|
10065
|
+
_v5 = _v2.get_pointer(0).to_utf8
|
10066
|
+
return [_v4, _v5]
|
10067
|
+
end
|
9816
10068
|
def self.uuid_string_is_valid(str)
|
9817
10069
|
_v1 = GirFFI::InPointer.from_utf8(str)
|
9818
10070
|
_v2 = GLib::Lib.g_uuid_string_is_valid(_v1)
|
@@ -9869,6 +10121,11 @@ module GLib
|
|
9869
10121
|
_v3 = GLib::VariantType.wrap_copy(_v2)
|
9870
10122
|
return _v3
|
9871
10123
|
end
|
10124
|
+
def self.variant_type_string_get_depth_(type_string)
|
10125
|
+
_v1 = GirFFI::InPointer.from_utf8(type_string)
|
10126
|
+
_v2 = GLib::Lib.g_variant_type_string_get_depth_(_v1)
|
10127
|
+
return _v2
|
10128
|
+
end
|
9872
10129
|
def self.variant_type_string_is_valid(type_string)
|
9873
10130
|
_v1 = GirFFI::InPointer.from_utf8(type_string)
|
9874
10131
|
_v2 = GLib::Lib.g_variant_type_string_is_valid(_v1)
|