gir_ffi 0.8.6 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +18 -0
  3. data/README.md +3 -4
  4. data/lib/ffi-glib.rb +1 -0
  5. data/lib/ffi-glib/container_class_methods.rb +12 -0
  6. data/lib/ffi-glib/destroy_notify.rb +15 -0
  7. data/lib/ffi-glib/main_loop.rb +23 -4
  8. data/lib/ffi-gobject.rb +4 -2
  9. data/lib/ffi-gobject/object.rb +31 -16
  10. data/lib/ffi-gobject/object_class.rb +4 -0
  11. data/lib/ffi-gobject/value.rb +3 -3
  12. data/lib/ffi-gobject_introspection/i_flags_info.rb +0 -1
  13. data/lib/gir_ffi-base/gobject/lib.rb +10 -0
  14. data/lib/gir_ffi/arg_helper.rb +1 -22
  15. data/lib/gir_ffi/boxed_base.rb +1 -0
  16. data/lib/gir_ffi/builder.rb +7 -1
  17. data/lib/gir_ffi/builders/argument_builder.rb +21 -9
  18. data/lib/gir_ffi/builders/argument_builder_collection.rb +28 -9
  19. data/lib/gir_ffi/builders/base_argument_builder.rb +36 -12
  20. data/lib/gir_ffi/builders/base_method_builder.rb +1 -1
  21. data/lib/gir_ffi/builders/callback_argument_builder.rb +4 -0
  22. data/lib/gir_ffi/builders/closure_to_pointer_convertor.rb +3 -2
  23. data/lib/gir_ffi/builders/constructor_builder.rb +1 -1
  24. data/lib/gir_ffi/builders/enum_builder.rb +4 -4
  25. data/lib/gir_ffi/builders/error_argument_builder.rb +4 -0
  26. data/lib/gir_ffi/builders/field_builder.rb +23 -9
  27. data/lib/gir_ffi/builders/flags_builder.rb +28 -0
  28. data/lib/gir_ffi/builders/full_c_to_ruby_convertor.rb +18 -0
  29. data/lib/gir_ffi/builders/module_builder.rb +1 -0
  30. data/lib/gir_ffi/builders/null_argument_builder.rb +9 -1
  31. data/lib/gir_ffi/builders/object_builder.rb +7 -4
  32. data/lib/gir_ffi/builders/property_builder.rb +2 -2
  33. data/lib/gir_ffi/builders/return_value_builder.rb +4 -4
  34. data/lib/gir_ffi/builders/struct_builder.rb +10 -2
  35. data/lib/gir_ffi/builders/type_builder.rb +12 -9
  36. data/lib/gir_ffi/builders/unintrospectable_boxed_builder.rb +26 -0
  37. data/lib/gir_ffi/builders/user_defined_builder.rb +2 -2
  38. data/lib/gir_ffi/builders/with_layout.rb +1 -1
  39. data/lib/gir_ffi/callback_base.rb +13 -5
  40. data/lib/gir_ffi/core.rb +1 -0
  41. data/lib/gir_ffi/error_argument_info.rb +4 -0
  42. data/lib/gir_ffi/flags_base.rb +63 -0
  43. data/lib/gir_ffi/in_pointer.rb +1 -3
  44. data/lib/gir_ffi/info_ext/i_type_info.rb +6 -0
  45. data/lib/gir_ffi/object_base.rb +9 -1
  46. data/lib/gir_ffi/object_store.rb +26 -0
  47. data/lib/gir_ffi/unintrospectable_boxed_info.rb +31 -0
  48. data/lib/gir_ffi/unintrospectable_type_info.rb +5 -0
  49. data/lib/gir_ffi/user_defined_type_info.rb +19 -0
  50. data/lib/gir_ffi/version.rb +1 -1
  51. data/test/ffi-glib/destroy_notify_test.rb +13 -0
  52. data/test/ffi-glib/main_loop_test.rb +3 -3
  53. data/test/ffi-gobject/object_class_test.rb +8 -0
  54. data/test/ffi-gobject/object_test.rb +23 -5
  55. data/test/ffi-gobject/value_test.rb +19 -5
  56. data/test/ffi-gobject_test.rb +2 -2
  57. data/test/gir_ffi/builders/argument_builder_test.rb +12 -2
  58. data/test/gir_ffi/builders/constructor_builder_test.rb +4 -4
  59. data/test/gir_ffi/builders/function_builder_test.rb +46 -3
  60. data/test/gir_ffi/builders/object_builder_test.rb +25 -0
  61. data/test/gir_ffi/builders/property_builder_test.rb +4 -4
  62. data/test/gir_ffi/builders/struct_builder_test.rb +15 -13
  63. data/test/gir_ffi/builders/unintrospectable_boxed_builder_test.rb +33 -0
  64. data/test/gir_ffi/builders/unintrospectable_builder_test.rb +6 -0
  65. data/test/gir_ffi/builders/user_defined_builder_test.rb +7 -1
  66. data/test/gir_ffi/callback_base_test.rb +12 -2
  67. data/test/gir_ffi/object_base_test.rb +14 -0
  68. data/test/integration/callback_exceptions_test.rb +61 -0
  69. data/test/integration/generated_gimarshallingtests_test.rb +70 -70
  70. data/test/integration/generated_gio_test.rb +1 -1
  71. data/test/integration/generated_gobject_test.rb +1 -1
  72. data/test/integration/generated_gtop_test.rb +5 -1
  73. data/test/integration/generated_regress_test.rb +83 -102
  74. data/test/integration/generated_warnlib_test.rb +2 -2
  75. metadata +42 -4
@@ -18,8 +18,8 @@ describe 'The generated WarnLib module' do
18
18
  @result = nil
19
19
  derived_klass.class_eval { include WarnLib::Whatever }
20
20
  GirFFI.define_type derived_klass do |info|
21
- info.install_vfunc_implementation :do_boo, proc { |obj, x, y| @result = "boo#{x}" }
22
- info.install_vfunc_implementation :do_moo, proc { |obj, x, y| @result = "moo#{x}" }
21
+ info.install_vfunc_implementation :do_boo, proc { |_obj, x, _y| @result = "boo#{x}" }
22
+ info.install_vfunc_implementation :do_moo, proc { |_obj, x, _y| @result = "moo#{x}" }
23
23
  end
24
24
  end
25
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gir_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2016-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: ffi-bit_masks
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: indentation
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +80,20 @@ dependencies:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: 0.3.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec-mocks
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.4.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.4.1
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: rake
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -109,6 +137,7 @@ files:
109
137
  - lib/ffi-glib/byte_array.rb
110
138
  - lib/ffi-glib/bytes.rb
111
139
  - lib/ffi-glib/container_class_methods.rb
140
+ - lib/ffi-glib/destroy_notify.rb
112
141
  - lib/ffi-glib/error.rb
113
142
  - lib/ffi-glib/hash_table.rb
114
143
  - lib/ffi-glib/iconv.rb
@@ -181,6 +210,8 @@ files:
181
210
  - lib/gir_ffi/builders/enum_builder.rb
182
211
  - lib/gir_ffi/builders/error_argument_builder.rb
183
212
  - lib/gir_ffi/builders/field_builder.rb
213
+ - lib/gir_ffi/builders/flags_builder.rb
214
+ - lib/gir_ffi/builders/full_c_to_ruby_convertor.rb
184
215
  - lib/gir_ffi/builders/function_builder.rb
185
216
  - lib/gir_ffi/builders/initializer_builder.rb
186
217
  - lib/gir_ffi/builders/initializer_return_value_builder.rb
@@ -201,6 +232,7 @@ files:
201
232
  - lib/gir_ffi/builders/signal_closure_builder.rb
202
233
  - lib/gir_ffi/builders/struct_builder.rb
203
234
  - lib/gir_ffi/builders/type_builder.rb
235
+ - lib/gir_ffi/builders/unintrospectable_boxed_builder.rb
204
236
  - lib/gir_ffi/builders/unintrospectable_builder.rb
205
237
  - lib/gir_ffi/builders/union_builder.rb
206
238
  - lib/gir_ffi/builders/user_defined_builder.rb
@@ -216,6 +248,7 @@ files:
216
248
  - lib/gir_ffi/ffi_ext.rb
217
249
  - lib/gir_ffi/ffi_ext/pointer.rb
218
250
  - lib/gir_ffi/field_argument_info.rb
251
+ - lib/gir_ffi/flags_base.rb
219
252
  - lib/gir_ffi/g_type.rb
220
253
  - lib/gir_ffi/glib_error.rb
221
254
  - lib/gir_ffi/in_out_pointer.rb
@@ -240,6 +273,7 @@ files:
240
273
  - lib/gir_ffi/method_stubber.rb
241
274
  - lib/gir_ffi/module_base.rb
242
275
  - lib/gir_ffi/object_base.rb
276
+ - lib/gir_ffi/object_store.rb
243
277
  - lib/gir_ffi/receiver_argument_info.rb
244
278
  - lib/gir_ffi/receiver_type_info.rb
245
279
  - lib/gir_ffi/registered_type_base.rb
@@ -248,6 +282,7 @@ files:
248
282
  - lib/gir_ffi/struct_base.rb
249
283
  - lib/gir_ffi/type_base.rb
250
284
  - lib/gir_ffi/type_map.rb
285
+ - lib/gir_ffi/unintrospectable_boxed_info.rb
251
286
  - lib/gir_ffi/unintrospectable_type_info.rb
252
287
  - lib/gir_ffi/union_base.rb
253
288
  - lib/gir_ffi/user_data_argument_info.rb
@@ -263,6 +298,7 @@ files:
263
298
  - test/ffi-glib/array_test.rb
264
299
  - test/ffi-glib/byte_array_test.rb
265
300
  - test/ffi-glib/bytes_test.rb
301
+ - test/ffi-glib/destroy_notify_test.rb
266
302
  - test/ffi-glib/hash_table_test.rb
267
303
  - test/ffi-glib/iconv_test.rb
268
304
  - test/ffi-glib/list_test.rb
@@ -313,6 +349,7 @@ files:
313
349
  - test/gir_ffi/builders/return_value_builder_test.rb
314
350
  - test/gir_ffi/builders/signal_closure_builder_test.rb
315
351
  - test/gir_ffi/builders/struct_builder_test.rb
352
+ - test/gir_ffi/builders/unintrospectable_boxed_builder_test.rb
316
353
  - test/gir_ffi/builders/unintrospectable_builder_test.rb
317
354
  - test/gir_ffi/builders/union_builder_test.rb
318
355
  - test/gir_ffi/builders/user_defined_builder_test.rb
@@ -346,6 +383,7 @@ files:
346
383
  - test/gir_ffi/zero_terminated_test.rb
347
384
  - test/gir_ffi_test.rb
348
385
  - test/gir_ffi_test_helper.rb
386
+ - test/integration/callback_exceptions_test.rb
349
387
  - test/integration/derived_classes_test.rb
350
388
  - test/integration/generated_everything_test.rb
351
389
  - test/integration/generated_gimarshallingtests_test.rb
@@ -379,7 +417,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
379
417
  requirements:
380
418
  - - ">="
381
419
  - !ruby/object:Gem::Version
382
- version: 1.9.3
420
+ version: 2.0.0
383
421
  required_rubygems_version: !ruby/object:Gem::Requirement
384
422
  requirements:
385
423
  - - ">="
@@ -387,7 +425,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
387
425
  version: '0'
388
426
  requirements: []
389
427
  rubyforge_project:
390
- rubygems_version: 2.5.0
428
+ rubygems_version: 2.5.1
391
429
  signing_key:
392
430
  specification_version: 4
393
431
  summary: FFI-based GObject binding using the GObject Introspection Repository