gir_ffi 0.6.7 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/{History.txt → Changelog.md} +93 -61
  3. data/{DESIGN.rdoc → DESIGN.md} +7 -7
  4. data/README.md +5 -7
  5. data/TODO.md +90 -0
  6. data/lib/ffi-glib.rb +0 -1
  7. data/lib/ffi-glib/array.rb +13 -29
  8. data/lib/ffi-glib/array_methods.rb +13 -0
  9. data/lib/ffi-glib/container_class_methods.rb +6 -1
  10. data/lib/ffi-glib/hash_table.rb +3 -2
  11. data/lib/ffi-glib/list.rb +3 -17
  12. data/lib/ffi-glib/list_methods.rb +22 -3
  13. data/lib/ffi-glib/ptr_array.rb +19 -19
  14. data/lib/ffi-glib/s_list.rb +3 -17
  15. data/lib/ffi-gobject.rb +10 -17
  16. data/lib/ffi-gobject/object.rb +19 -9
  17. data/lib/ffi-gobject/object_class.rb +14 -0
  18. data/lib/ffi-gobject/ruby_closure.rb +4 -5
  19. data/lib/ffi-gobject/value.rb +7 -5
  20. data/lib/ffi-gobject_introspection/i_vfunc_info.rb +1 -1
  21. data/lib/gir_ffi-base.rb +0 -2
  22. data/lib/gir_ffi-base/gobject.rb +1 -0
  23. data/lib/gir_ffi-base/gobject/lib.rb +1 -1
  24. data/lib/gir_ffi.rb +2 -0
  25. data/lib/gir_ffi/arg_helper.rb +18 -8
  26. data/lib/gir_ffi/builders/argument_builder.rb +62 -55
  27. data/lib/gir_ffi/builders/base_argument_builder.rb +52 -106
  28. data/lib/gir_ffi/builders/base_type_builder.rb +3 -3
  29. data/lib/gir_ffi/builders/c_to_ruby_convertor.rb +34 -0
  30. data/lib/gir_ffi/builders/callback_argument_builder.rb +73 -0
  31. data/lib/gir_ffi/builders/callback_builder.rb +19 -9
  32. data/lib/gir_ffi/builders/callback_return_value_builder.rb +54 -0
  33. data/lib/gir_ffi/builders/closure_convertor.rb +9 -0
  34. data/lib/gir_ffi/builders/closure_to_pointer_convertor.rb +9 -0
  35. data/lib/gir_ffi/builders/constructor_result_convertor.rb +9 -0
  36. data/lib/gir_ffi/builders/enum_builder.rb +16 -16
  37. data/lib/gir_ffi/builders/field_builder.rb +36 -15
  38. data/lib/gir_ffi/builders/function_builder.rb +32 -27
  39. data/lib/gir_ffi/builders/interface_builder.rb +14 -4
  40. data/lib/gir_ffi/builders/mapping_method_builder.rb +95 -43
  41. data/lib/gir_ffi/builders/module_builder.rb +22 -35
  42. data/lib/gir_ffi/builders/null_convertor.rb +9 -0
  43. data/lib/gir_ffi/builders/object_builder.rb +11 -14
  44. data/lib/gir_ffi/builders/property_builder.rb +107 -9
  45. data/lib/gir_ffi/builders/registered_type_builder.rb +2 -2
  46. data/lib/gir_ffi/builders/return_value_builder.rb +42 -33
  47. data/lib/gir_ffi/builders/ruby_to_c_convertor.rb +15 -0
  48. data/lib/gir_ffi/builders/signal_builder.rb +18 -58
  49. data/lib/gir_ffi/builders/struct_builder.rb +1 -2
  50. data/lib/gir_ffi/builders/type_builder.rb +1 -0
  51. data/lib/gir_ffi/builders/unintrospectable_builder.rb +4 -4
  52. data/lib/gir_ffi/builders/user_defined_builder.rb +151 -26
  53. data/lib/gir_ffi/builders/vfunc_builder.rb +57 -0
  54. data/lib/gir_ffi/builders/with_layout.rb +10 -8
  55. data/lib/gir_ffi/builders/with_methods.rb +1 -1
  56. data/lib/gir_ffi/callback_base.rb +42 -8
  57. data/lib/gir_ffi/class_base.rb +1 -2
  58. data/lib/gir_ffi/enum_base.rb +26 -4
  59. data/lib/gir_ffi/error_argument_info.rb +21 -0
  60. data/lib/gir_ffi/{setter_argument_info.rb → field_argument_info.rb} +2 -1
  61. data/lib/gir_ffi/g_type.rb +25 -0
  62. data/lib/gir_ffi/in_out_pointer.rb +3 -14
  63. data/lib/gir_ffi/in_pointer.rb +20 -21
  64. data/lib/gir_ffi/info_ext.rb +2 -0
  65. data/lib/gir_ffi/info_ext/i_callable_info.rb +0 -9
  66. data/lib/gir_ffi/info_ext/i_callback_info.rb +17 -0
  67. data/lib/gir_ffi/info_ext/i_function_info.rb +4 -0
  68. data/lib/gir_ffi/info_ext/i_property_info.rb +4 -0
  69. data/lib/gir_ffi/info_ext/i_registered_type_info.rb +1 -0
  70. data/lib/gir_ffi/info_ext/i_signal_info.rb +14 -16
  71. data/lib/gir_ffi/info_ext/i_type_info.rb +72 -34
  72. data/lib/gir_ffi/info_ext/i_vfunc_info.rb +12 -0
  73. data/lib/gir_ffi/info_ext/safe_constant_name.rb +3 -2
  74. data/lib/gir_ffi/interface_base.rb +8 -3
  75. data/lib/gir_ffi/module_base.rb +3 -5
  76. data/lib/gir_ffi/object_base.rb +8 -0
  77. data/lib/gir_ffi/receiver_argument_info.rb +21 -0
  78. data/lib/gir_ffi/receiver_type_info.rb +27 -0
  79. data/lib/gir_ffi/return_value_info.rb +23 -0
  80. data/lib/gir_ffi/signal_base.rb +1 -1
  81. data/lib/{ffi-glib → gir_ffi}/sized_array.rb +10 -6
  82. data/lib/gir_ffi/struct_base.rb +10 -9
  83. data/lib/gir_ffi/type_base.rb +1 -0
  84. data/lib/gir_ffi/type_map.rb +3 -0
  85. data/lib/gir_ffi/unintrospectable_type_info.rb +4 -1
  86. data/lib/gir_ffi/union_base.rb +4 -21
  87. data/lib/gir_ffi/user_data_argument_info.rb +21 -0
  88. data/lib/gir_ffi/user_data_type_info.rb +17 -0
  89. data/lib/gir_ffi/user_defined_type_info.rb +18 -4
  90. data/lib/gir_ffi/version.rb +1 -1
  91. data/lib/gir_ffi/vfunc_base.rb +8 -0
  92. data/lib/gir_ffi/vfunc_implementation.rb +11 -0
  93. data/lib/gir_ffi/zero_terminated.rb +18 -24
  94. data/test/base_test_helper.rb +2 -3
  95. data/test/ffi-glib/array_test.rb +3 -3
  96. data/test/ffi-glib/ruby_closure_test.rb +3 -3
  97. data/test/ffi-gobject/value_test.rb +15 -1
  98. data/test/ffi-gobject_test.rb +2 -1
  99. data/test/gir_ffi/arg_helper_test.rb +21 -2
  100. data/test/gir_ffi/builders/argument_builder_test.rb +213 -287
  101. data/test/gir_ffi/builders/base_argument_builder_test.rb +1 -1
  102. data/test/gir_ffi/builders/callback_builder_test.rb +26 -8
  103. data/test/gir_ffi/builders/field_builder_test.rb +18 -3
  104. data/test/gir_ffi/builders/function_builder_test.rb +30 -12
  105. data/test/gir_ffi/builders/interface_builder_test.rb +9 -0
  106. data/test/gir_ffi/builders/module_builder_test.rb +0 -39
  107. data/test/gir_ffi/builders/object_builder_test.rb +27 -27
  108. data/test/gir_ffi/builders/property_builder_test.rb +110 -0
  109. data/test/gir_ffi/builders/return_value_builder_test.rb +168 -200
  110. data/test/gir_ffi/builders/signal_builder_test.rb +58 -14
  111. data/test/gir_ffi/builders/struct_builder_test.rb +2 -41
  112. data/test/gir_ffi/builders/user_defined_builder_test.rb +88 -20
  113. data/test/gir_ffi/builders/vfunc_builder_test.rb +44 -0
  114. data/test/gir_ffi/g_type_test.rb +29 -0
  115. data/test/gir_ffi/in_pointer_test.rb +28 -9
  116. data/test/gir_ffi/info_ext/i_callable_info_test.rb +0 -9
  117. data/test/gir_ffi/info_ext/i_callback_info_test.rb +19 -0
  118. data/test/gir_ffi/info_ext/i_function_info_test.rb +9 -0
  119. data/test/gir_ffi/info_ext/i_signal_info_test.rb +8 -11
  120. data/test/gir_ffi/info_ext/i_type_info_test.rb +140 -16
  121. data/test/gir_ffi/interface_base_test.rb +9 -3
  122. data/test/gir_ffi/object_base_test.rb +1 -2
  123. data/test/{ffi-glib → gir_ffi}/sized_array_test.rb +28 -28
  124. data/test/gir_ffi/type_map_test.rb +1 -1
  125. data/test/gir_ffi/user_defined_type_info_test.rb +36 -4
  126. data/test/gir_ffi_test.rb +5 -5
  127. data/test/gir_ffi_test_helper.rb +4 -0
  128. data/test/integration/generated_gimarshallingtests_test.rb +163 -59
  129. data/test/integration/generated_gobject_test.rb +21 -8
  130. data/test/integration/generated_pango_test.rb +2 -2
  131. data/test/integration/generated_regress_test.rb +361 -101
  132. data/test/lib/autogen.sh +5 -1
  133. metadata +51 -35
  134. data/TODO.rdoc +0 -63
  135. data/lib/gir_ffi-base/gir_ffi/library.rb +0 -17
  136. data/lib/gir_ffi-base/gir_ffi/struct.rb +0 -27
@@ -41,7 +41,10 @@ if autoconf --version < /dev/null > /dev/null 2>&1 ; then : ; else
41
41
  DIE=1
42
42
  fi
43
43
 
44
- if automake-1.13 --version < /dev/null > /dev/null 2>&1 ; then
44
+ if automake-1.14 --version < /dev/null > /dev/null 2>&1 ; then
45
+ AUTOMAKE=automake-1.14
46
+ ACLOCAL=aclocal-1.14
47
+ else if automake-1.13 --version < /dev/null > /dev/null 2>&1 ; then
45
48
  AUTOMAKE=automake-1.13
46
49
  ACLOCAL=aclocal-1.13
47
50
  else if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
@@ -59,6 +62,7 @@ else
59
62
  fi
60
63
  fi
61
64
  fi
65
+ fi
62
66
 
63
67
  if test "$DIE" -eq 1; then
64
68
  exit 1
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gir_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
5
- prerelease:
4
+ version: 0.7.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matijs van Zuijlen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-28 00:00:00.000000000 Z
11
+ date: 2014-01-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: ffi
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,23 +27,20 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: indentation
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
37
- version: 0.0.6
33
+ version: 0.1.1
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
- version: 0.0.6
40
+ version: 0.1.1
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: minitest
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,23 +55,20 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rr
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
69
- version: 1.0.4
61
+ version: 1.1.2
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
77
- version: 1.0.4
68
+ version: 1.1.2
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rake
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -97,29 +86,36 @@ email:
97
86
  executables: []
98
87
  extensions: []
99
88
  extra_rdoc_files:
100
- - DESIGN.rdoc
101
- - History.txt
89
+ - DESIGN.md
90
+ - Changelog.md
102
91
  - README.md
103
- - TODO.rdoc
92
+ - TODO.md
104
93
  files:
105
94
  - lib/gir_ffi-base.rb
106
95
  - lib/ffi-gobject_introspection.rb
107
96
  - lib/gir_ffi.rb
97
+ - lib/gir_ffi/vfunc_implementation.rb
108
98
  - lib/gir_ffi/lib_c.rb
109
99
  - lib/gir_ffi/method_stubber.rb
110
100
  - lib/gir_ffi/arg_helper.rb
111
101
  - lib/gir_ffi/info_ext.rb
102
+ - lib/gir_ffi/user_data_argument_info.rb
112
103
  - lib/gir_ffi/struct_base.rb
113
104
  - lib/gir_ffi/allocation_helper.rb
105
+ - lib/gir_ffi/user_data_type_info.rb
114
106
  - lib/gir_ffi/ffi_ext.rb
115
107
  - lib/gir_ffi/type_map.rb
116
108
  - lib/gir_ffi/signal_base.rb
117
109
  - lib/gir_ffi/zero_terminated.rb
118
110
  - lib/gir_ffi/unintrospectable_type_info.rb
111
+ - lib/gir_ffi/builders/constructor_result_convertor.rb
119
112
  - lib/gir_ffi/builders/enum_builder.rb
120
113
  - lib/gir_ffi/builders/registered_type_builder.rb
114
+ - lib/gir_ffi/builders/callback_return_value_builder.rb
115
+ - lib/gir_ffi/builders/closure_convertor.rb
121
116
  - lib/gir_ffi/builders/constant_builder.rb
122
117
  - lib/gir_ffi/builders/mapping_method_builder.rb
118
+ - lib/gir_ffi/builders/null_convertor.rb
123
119
  - lib/gir_ffi/builders/struct_builder.rb
124
120
  - lib/gir_ffi/builders/argument_builder.rb
125
121
  - lib/gir_ffi/builders/error_argument_builder.rb
@@ -129,13 +125,18 @@ files:
129
125
  - lib/gir_ffi/builders/return_value_builder.rb
130
126
  - lib/gir_ffi/builders/property_builder.rb
131
127
  - lib/gir_ffi/builders/unintrospectable_builder.rb
128
+ - lib/gir_ffi/builders/closure_to_pointer_convertor.rb
132
129
  - lib/gir_ffi/builders/interface_builder.rb
130
+ - lib/gir_ffi/builders/vfunc_builder.rb
133
131
  - lib/gir_ffi/builders/with_methods.rb
134
132
  - lib/gir_ffi/builders/with_layout.rb
135
133
  - lib/gir_ffi/builders/callback_builder.rb
134
+ - lib/gir_ffi/builders/callback_argument_builder.rb
136
135
  - lib/gir_ffi/builders/null_argument_builder.rb
136
+ - lib/gir_ffi/builders/ruby_to_c_convertor.rb
137
137
  - lib/gir_ffi/builders/user_defined_builder.rb
138
138
  - lib/gir_ffi/builders/null_builder.rb
139
+ - lib/gir_ffi/builders/c_to_ruby_convertor.rb
139
140
  - lib/gir_ffi/builders/field_builder.rb
140
141
  - lib/gir_ffi/builders/module_builder.rb
141
142
  - lib/gir_ffi/builders/base_argument_builder.rb
@@ -144,40 +145,48 @@ files:
144
145
  - lib/gir_ffi/builders/function_builder.rb
145
146
  - lib/gir_ffi/user_defined_property_info.rb
146
147
  - lib/gir_ffi/ffi_ext/pointer.rb
147
- - lib/gir_ffi/setter_argument_info.rb
148
148
  - lib/gir_ffi/builder_helper.rb
149
149
  - lib/gir_ffi/variable_name_generator.rb
150
+ - lib/gir_ffi/field_argument_info.rb
150
151
  - lib/gir_ffi/in_pointer.rb
151
152
  - lib/gir_ffi/enum_base.rb
152
153
  - lib/gir_ffi/callback_base.rb
154
+ - lib/gir_ffi/receiver_argument_info.rb
153
155
  - lib/gir_ffi/type_base.rb
154
156
  - lib/gir_ffi/union_base.rb
155
157
  - lib/gir_ffi/in_out_pointer.rb
156
158
  - lib/gir_ffi/version.rb
159
+ - lib/gir_ffi/return_value_info.rb
157
160
  - lib/gir_ffi/builder.rb
161
+ - lib/gir_ffi/sized_array.rb
158
162
  - lib/gir_ffi/interface_base.rb
163
+ - lib/gir_ffi/info_ext/i_callback_info.rb
159
164
  - lib/gir_ffi/info_ext/i_arg_info.rb
160
165
  - lib/gir_ffi/info_ext/i_type_info.rb
161
166
  - lib/gir_ffi/info_ext/i_function_info.rb
162
167
  - lib/gir_ffi/info_ext/i_callable_info.rb
163
168
  - lib/gir_ffi/info_ext/i_field_info.rb
169
+ - lib/gir_ffi/info_ext/i_vfunc_info.rb
164
170
  - lib/gir_ffi/info_ext/safe_constant_name.rb
165
171
  - lib/gir_ffi/info_ext/i_property_info.rb
166
172
  - lib/gir_ffi/info_ext/i_signal_info.rb
167
173
  - lib/gir_ffi/info_ext/safe_function_name.rb
168
174
  - lib/gir_ffi/info_ext/i_registered_type_info.rb
175
+ - lib/gir_ffi/g_type.rb
169
176
  - lib/gir_ffi/module_base.rb
170
177
  - lib/gir_ffi/user_defined_type_info.rb
171
178
  - lib/gir_ffi/class_base.rb
179
+ - lib/gir_ffi/receiver_type_info.rb
172
180
  - lib/gir_ffi/object_base.rb
173
- - lib/gir_ffi-base/gir_ffi/library.rb
174
- - lib/gir_ffi-base/gir_ffi/struct.rb
181
+ - lib/gir_ffi/vfunc_base.rb
182
+ - lib/gir_ffi/error_argument_info.rb
175
183
  - lib/gir_ffi-base/gobject/lib.rb
176
184
  - lib/gir_ffi-base/gobject.rb
177
185
  - lib/gir_ffi-base/glib/boolean.rb
178
186
  - lib/gir_ffi-base/glib/strv.rb
179
187
  - lib/ffi-gobject/ruby_closure.rb
180
188
  - lib/ffi-gobject/base.rb
189
+ - lib/ffi-gobject/object_class.rb
181
190
  - lib/ffi-gobject/object.rb
182
191
  - lib/ffi-gobject/value.rb
183
192
  - lib/ffi-gobject/initially_unowned.rb
@@ -192,7 +201,7 @@ files:
192
201
  - lib/ffi-glib/byte_array.rb
193
202
  - lib/ffi-glib/ptr_array.rb
194
203
  - lib/ffi-glib/variant.rb
195
- - lib/ffi-glib/sized_array.rb
204
+ - lib/ffi-glib/array_methods.rb
196
205
  - lib/ffi-glib/s_list.rb
197
206
  - lib/ffi-gobject_introspection/i_struct_info.rb
198
207
  - lib/ffi-gobject_introspection/i_callback_info.rb
@@ -232,6 +241,7 @@ files:
232
241
  - test/integration/generated_pango_test.rb
233
242
  - test/integration/generated_secret_test.rb
234
243
  - test/integration/generated_gobject_test.rb
244
+ - test/gir_ffi/g_type_test.rb
235
245
  - test/gir_ffi/callback_base_test.rb
236
246
  - test/gir_ffi/user_defined_property_info_test.rb
237
247
  - test/gir_ffi/zero_terminated_test.rb
@@ -246,6 +256,7 @@ files:
246
256
  - test/gir_ffi/builders/constant_builder_test.rb
247
257
  - test/gir_ffi/builders/unintrospectable_builder_test.rb
248
258
  - test/gir_ffi/builders/function_builder_test.rb
259
+ - test/gir_ffi/builders/vfunc_builder_test.rb
249
260
  - test/gir_ffi/builders/base_argument_builder_test.rb
250
261
  - test/gir_ffi/builders/struct_builder_test.rb
251
262
  - test/gir_ffi/builders/union_builder_test.rb
@@ -254,6 +265,7 @@ files:
254
265
  - test/gir_ffi/builders/return_value_builder_test.rb
255
266
  - test/gir_ffi/builders/interface_builder_test.rb
256
267
  - test/gir_ffi/builders/object_builder_test.rb
268
+ - test/gir_ffi/builders/property_builder_test.rb
257
269
  - test/gir_ffi/builders/module_builder_test.rb
258
270
  - test/gir_ffi/builders/user_defined_builder_test.rb
259
271
  - test/gir_ffi/variable_name_generator_test.rb
@@ -262,6 +274,7 @@ files:
262
274
  - test/gir_ffi/type_map_test.rb
263
275
  - test/gir_ffi/user_defined_type_info_test.rb
264
276
  - test/gir_ffi/unintrospectable_type_info_test.rb
277
+ - test/gir_ffi/info_ext/i_callback_info_test.rb
265
278
  - test/gir_ffi/info_ext/i_callable_info_test.rb
266
279
  - test/gir_ffi/info_ext/i_type_info_test.rb
267
280
  - test/gir_ffi/info_ext/i_signal_info_test.rb
@@ -269,6 +282,7 @@ files:
269
282
  - test/gir_ffi/info_ext/safe_function_name_test.rb
270
283
  - test/gir_ffi/info_ext/i_field_info_test.rb
271
284
  - test/gir_ffi/info_ext/i_function_info_test.rb
285
+ - test/gir_ffi/sized_array_test.rb
272
286
  - test/gir_ffi/interface_base_test.rb
273
287
  - test/gir_ffi-base/glib/boolean_test.rb
274
288
  - test/gir_ffi-base/glib/strv_test.rb
@@ -285,7 +299,6 @@ files:
285
299
  - test/ffi-glib/byte_array_test.rb
286
300
  - test/ffi-glib/ruby_closure_test.rb
287
301
  - test/ffi-glib/variant_test.rb
288
- - test/ffi-glib/sized_array_test.rb
289
302
  - test/ffi-glib/strv_test.rb
290
303
  - test/ffi-gobject_introspection/i_repository_test.rb
291
304
  - test/ffi-gobject_introspection/i_constant_info_test.rb
@@ -305,14 +318,15 @@ files:
305
318
  - examples/demo_ffi_safe_inherited_layout.rb
306
319
  - examples/demo_ffi_inherited_layout.rb
307
320
  - examples/print_class.rb
321
+ - Changelog.md
322
+ - TODO.md
323
+ - DESIGN.md
308
324
  - README.md
309
- - DESIGN.rdoc
310
- - TODO.rdoc
311
- - History.txt
312
325
  - Rakefile
313
326
  - COPYING.LIB
314
327
  homepage: http://www.github.com/mvz/ruby-gir-ffi
315
328
  licenses: []
329
+ metadata: {}
316
330
  post_install_message:
317
331
  rdoc_options:
318
332
  - --main
@@ -320,22 +334,20 @@ rdoc_options:
320
334
  require_paths:
321
335
  - lib
322
336
  required_ruby_version: !ruby/object:Gem::Requirement
323
- none: false
324
337
  requirements:
325
- - - ! '>='
338
+ - - '>='
326
339
  - !ruby/object:Gem::Version
327
340
  version: '0'
328
341
  required_rubygems_version: !ruby/object:Gem::Requirement
329
- none: false
330
342
  requirements:
331
- - - ! '>='
343
+ - - '>='
332
344
  - !ruby/object:Gem::Version
333
345
  version: '0'
334
346
  requirements: []
335
347
  rubyforge_project:
336
- rubygems_version: 1.8.23
348
+ rubygems_version: 2.0.14
337
349
  signing_key:
338
- specification_version: 3
350
+ specification_version: 4
339
351
  summary: FFI-based GObject binding using the GObject Introspection Repository
340
352
  test_files:
341
353
  - test/base_test_helper.rb
@@ -346,7 +358,6 @@ test_files:
346
358
  - test/ffi-glib/ptr_array_test.rb
347
359
  - test/ffi-glib/ruby_closure_test.rb
348
360
  - test/ffi-glib/s_list_test.rb
349
- - test/ffi-glib/sized_array_test.rb
350
361
  - test/ffi-glib/strv_test.rb
351
362
  - test/ffi-glib/variant_test.rb
352
363
  - test/ffi-gobject/gobject_test.rb
@@ -375,18 +386,22 @@ test_files:
375
386
  - test/gir_ffi/builders/interface_builder_test.rb
376
387
  - test/gir_ffi/builders/module_builder_test.rb
377
388
  - test/gir_ffi/builders/object_builder_test.rb
389
+ - test/gir_ffi/builders/property_builder_test.rb
378
390
  - test/gir_ffi/builders/return_value_builder_test.rb
379
391
  - test/gir_ffi/builders/signal_builder_test.rb
380
392
  - test/gir_ffi/builders/struct_builder_test.rb
381
393
  - test/gir_ffi/builders/unintrospectable_builder_test.rb
382
394
  - test/gir_ffi/builders/union_builder_test.rb
383
395
  - test/gir_ffi/builders/user_defined_builder_test.rb
396
+ - test/gir_ffi/builders/vfunc_builder_test.rb
384
397
  - test/gir_ffi/callback_base_test.rb
385
398
  - test/gir_ffi/class_base_test.rb
386
399
  - test/gir_ffi/ffi_ext/pointer_test.rb
400
+ - test/gir_ffi/g_type_test.rb
387
401
  - test/gir_ffi/in_out_pointer_test.rb
388
402
  - test/gir_ffi/in_pointer_test.rb
389
403
  - test/gir_ffi/info_ext/i_callable_info_test.rb
404
+ - test/gir_ffi/info_ext/i_callback_info_test.rb
390
405
  - test/gir_ffi/info_ext/i_field_info_test.rb
391
406
  - test/gir_ffi/info_ext/i_function_info_test.rb
392
407
  - test/gir_ffi/info_ext/i_signal_info_test.rb
@@ -395,6 +410,7 @@ test_files:
395
410
  - test/gir_ffi/info_ext/safe_function_name_test.rb
396
411
  - test/gir_ffi/interface_base_test.rb
397
412
  - test/gir_ffi/object_base_test.rb
413
+ - test/gir_ffi/sized_array_test.rb
398
414
  - test/gir_ffi/type_map_test.rb
399
415
  - test/gir_ffi/unintrospectable_type_info_test.rb
400
416
  - test/gir_ffi/user_defined_property_info_test.rb
data/TODO.rdoc DELETED
@@ -1,63 +0,0 @@
1
- = TODO
2
-
3
- == Memory managment
4
-
5
- GirFFI does not attempt to free any memory at the moment, or lower the
6
- reference count of any objects it gets from GObject. This task therefore involves two parts:
7
-
8
- - Free non-GObject pointers as needed (at garbage-collection time)
9
- - Lower reference count of GObjects (at garbage-collection time)
10
-
11
- == Refactorings
12
-
13
- These in the order they occured to me, and may therefore be fixed in any order.
14
-
15
- - Create Type objects for all FFI types, including the ones currently
16
- represented by a single symbol, so we can always do stuff like
17
-
18
- GirFFI::Types::UInt8.get_value_from_pointer(ptr)
19
-
20
- rather than having awkward dynamic method dispatch inside GirFFI::InOutPointer.
21
-
22
- - Move code in GirFFI::Struct to StructBase, then somehow unify UnionBase and
23
- StructBase.
24
-
25
- - Move to a single Pointer class, rather than InPointer, InOutPointer and
26
- Pointer monkeypatching.
27
-
28
- - Move special types like SizedArray to sane namespaces. Types (like
29
- GLib::List) that have actual GLib implementations go to the GLib namespace.
30
- Other types go to the GirFFI namespace.
31
-
32
- - Use argumentbuilders to build signal argument marshalling functions.
33
-
34
- == Persistent Ruby GObject identity
35
-
36
- GirFFI should make sure that if it gets a pointer to a GObject for which a Ruby
37
- object already exists, the existing object is returned. This involves the use
38
- of WeakRef, no doubt.
39
-
40
- == Handle fundamental objects that are not GObject.
41
-
42
- This is a big one. See commit 1e9822c7817062a9b853269b9418fd78782090b5 in
43
- gobject-introspection, and TestFundamentalObject in Regress.
44
-
45
- The tests for TestFundamentalObject accidentally pass, but there may be
46
- hidden issues.
47
-
48
- == Check binding of GObject:
49
-
50
- (11:37:03 PM) walters: the basic story is that GObject should be manually bound
51
- (11:47:02 PM) ebassi: the really necessary bits are: GObject/GInitiallyUnowned memory management; properties accessors; GSignal connection API
52
- (11:47:15 PM) ebassi: the rest is "nice to have"
53
- (11:47:37 PM) ebassi: oh, and probably GBinding - but that's just because I wrote it ;-)
54
-
55
- == Use FFI::DataConverter to automatically convert GObject types
56
-
57
- GirFFI now generates loads of Something.wrap(ptr) calls; Perhaps these can be
58
- replace by implementing to_native and from_native in ClassBase and including
59
- FFI::DataConverter.
60
-
61
- == See Also
62
-
63
- dnote
@@ -1,17 +0,0 @@
1
- require 'ffi'
2
-
3
- module GirFFI
4
- module Library
5
- include FFI::Library
6
-
7
- def find_type type
8
- if type.is_a? Module
9
- if type.const_defined?(:Enum)
10
- return super type::Enum
11
- end
12
- end
13
-
14
- super
15
- end
16
- end
17
- end
@@ -1,27 +0,0 @@
1
- module GirFFI
2
- class Struct < FFI::Struct
3
- extend FFI::DataConverter
4
-
5
- def self.native_type
6
- FFI::Type::Struct.new(self)
7
- end
8
-
9
- def self.to_native value, context
10
- value
11
- end
12
-
13
- def self.from_native value, context
14
- value
15
- end
16
-
17
- # TODO: Find method to directly copy bytes, rather than reading and
18
- # putting them.
19
- def self.copy_value_to_pointer value, pointer, offset=0
20
- pointer.put_bytes offset, value.to_ptr.read_bytes(size), 0, size
21
- end
22
-
23
- def self.get_value_from_pointer pointer
24
- pointer.to_ptr
25
- end
26
- end
27
- end