gir_ffi 0.9.5 → 0.10.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +9 -0
- data/lib/ffi-glib/byte_array.rb +1 -1
- data/lib/ffi-glib/bytes.rb +4 -4
- data/lib/ffi-glib/container_class_methods.rb +2 -0
- data/lib/ffi-glib/iconv.rb +2 -2
- data/lib/ffi-glib/variant.rb +10 -2
- data/lib/ffi-gobject.rb +6 -14
- data/lib/ffi-gobject/object.rb +7 -0
- data/lib/ffi-gobject/object_class.rb +1 -1
- data/lib/ffi-gobject/param_spec.rb +12 -0
- data/lib/ffi-gobject/value.rb +20 -11
- data/lib/gir_ffi-base/gobject.rb +35 -3
- data/lib/gir_ffi-base/gobject/lib.rb +2 -0
- data/lib/gir_ffi/allocation_helper.rb +11 -0
- data/lib/gir_ffi/arg_helper.rb +4 -0
- data/lib/gir_ffi/boxed_base.rb +28 -32
- data/lib/gir_ffi/builders/argument_builder.rb +31 -6
- data/lib/gir_ffi/builders/c_to_ruby_convertor.rb +36 -7
- data/lib/gir_ffi/builders/callback_argument_builder.rb +24 -10
- data/lib/gir_ffi/builders/closure_to_pointer_convertor.rb +1 -1
- data/lib/gir_ffi/builders/field_builder.rb +28 -10
- data/lib/gir_ffi/builders/full_c_to_ruby_convertor.rb +2 -3
- data/lib/gir_ffi/builders/initializer_return_value_builder.rb +5 -1
- data/lib/gir_ffi/builders/null_argument_builder.rb +0 -12
- data/lib/gir_ffi/builders/pointer_value_convertor.rb +38 -0
- data/lib/gir_ffi/builders/return_value_builder.rb +12 -10
- data/lib/gir_ffi/builders/ruby_to_c_convertor.rb +21 -2
- data/lib/gir_ffi/builders/struct_builder.rb +9 -2
- data/lib/gir_ffi/builders/{boxed_builder.rb → struct_like.rb} +2 -5
- data/lib/gir_ffi/builders/unintrospectable_boxed_builder.rb +5 -2
- data/lib/gir_ffi/builders/union_builder.rb +5 -2
- data/lib/gir_ffi/enum_base.rb +4 -0
- data/lib/gir_ffi/error_argument_info.rb +0 -16
- data/lib/gir_ffi/ffi_ext/pointer.rb +11 -5
- data/lib/gir_ffi/flags_base.rb +4 -0
- data/lib/gir_ffi/in_out_pointer.rb +5 -30
- data/lib/gir_ffi/in_pointer.rb +5 -4
- data/lib/gir_ffi/info_ext/i_type_info.rb +3 -5
- data/lib/gir_ffi/object_base.rb +4 -0
- data/lib/gir_ffi/sized_array.rb +20 -0
- data/lib/gir_ffi/struct_base.rb +13 -2
- data/lib/gir_ffi/struct_like_base.rb +53 -0
- data/lib/gir_ffi/union_base.rb +7 -1
- data/lib/gir_ffi/version.rb +1 -1
- data/test/ffi-glib/destroy_notify_test.rb +4 -1
- data/test/ffi-gobject/param_spec_test.rb +18 -0
- data/test/gir_ffi/arg_helper_test.rb +17 -0
- data/test/gir_ffi/boxed_base_test.rb +24 -0
- data/test/gir_ffi/builders/argument_builder_test.rb +156 -63
- data/test/gir_ffi/builders/callback_argument_builder_test.rb +10 -10
- data/test/gir_ffi/builders/callback_builder_test.rb +31 -8
- data/test/gir_ffi/builders/field_builder_test.rb +32 -30
- data/test/gir_ffi/builders/function_builder_test.rb +251 -45
- data/test/gir_ffi/builders/initializer_builder_test.rb +17 -1
- data/test/gir_ffi/builders/return_value_builder_test.rb +115 -68
- data/test/gir_ffi/builders/struct_builder_test.rb +6 -0
- data/test/gir_ffi/builders/unintrospectable_builder_test.rb +4 -1
- data/test/gir_ffi/builders/vfunc_builder_test.rb +10 -10
- data/test/gir_ffi/in_out_pointer_test.rb +12 -81
- data/test/gir_ffi/in_pointer_test.rb +0 -17
- data/test/gir_ffi/info_ext/i_type_info_test.rb +0 -10
- data/test/gir_ffi/sized_array_test.rb +62 -0
- data/test/gir_ffi/struct_base_test.rb +24 -0
- data/test/gir_ffi/union_base_test.rb +24 -0
- data/test/gir_ffi/version_test.rb +1 -1
- data/test/integration/generated_gimarshallingtests_test.rb +32 -12
- data/test/integration/generated_regress_test.rb +9 -12
- metadata +12 -8
- data/lib/ffi-gobject/base.rb +0 -27
- data/lib/gir_ffi/user_data_argument_info.rb +0 -24
- data/lib/gir_ffi/user_data_type_info.rb +0 -22
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.
|
4
|
+
version: 0.10.0.pre1
|
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: 2016-03-
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -164,11 +164,11 @@ files:
|
|
164
164
|
- lib/ffi-glib/strv.rb
|
165
165
|
- lib/ffi-glib/variant.rb
|
166
166
|
- lib/ffi-gobject.rb
|
167
|
-
- lib/ffi-gobject/base.rb
|
168
167
|
- lib/ffi-gobject/closure.rb
|
169
168
|
- lib/ffi-gobject/initially_unowned.rb
|
170
169
|
- lib/ffi-gobject/object.rb
|
171
170
|
- lib/ffi-gobject/object_class.rb
|
171
|
+
- lib/ffi-gobject/param_spec.rb
|
172
172
|
- lib/ffi-gobject/ruby_closure.rb
|
173
173
|
- lib/ffi-gobject/value.rb
|
174
174
|
- lib/ffi-gobject_introspection.rb
|
@@ -213,7 +213,6 @@ files:
|
|
213
213
|
- lib/gir_ffi/builders/base_method_builder.rb
|
214
214
|
- lib/gir_ffi/builders/base_return_value_builder.rb
|
215
215
|
- lib/gir_ffi/builders/base_type_builder.rb
|
216
|
-
- lib/gir_ffi/builders/boxed_builder.rb
|
217
216
|
- lib/gir_ffi/builders/c_to_ruby_convertor.rb
|
218
217
|
- lib/gir_ffi/builders/callback_argument_builder.rb
|
219
218
|
- lib/gir_ffi/builders/callback_builder.rb
|
@@ -241,6 +240,7 @@ files:
|
|
241
240
|
- lib/gir_ffi/builders/null_convertor.rb
|
242
241
|
- lib/gir_ffi/builders/null_return_value_builder.rb
|
243
242
|
- lib/gir_ffi/builders/object_builder.rb
|
243
|
+
- lib/gir_ffi/builders/pointer_value_convertor.rb
|
244
244
|
- lib/gir_ffi/builders/property_argument_builder.rb
|
245
245
|
- lib/gir_ffi/builders/property_builder.rb
|
246
246
|
- lib/gir_ffi/builders/property_return_value_builder.rb
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- lib/gir_ffi/builders/ruby_to_c_convertor.rb
|
250
250
|
- lib/gir_ffi/builders/signal_closure_builder.rb
|
251
251
|
- lib/gir_ffi/builders/struct_builder.rb
|
252
|
+
- lib/gir_ffi/builders/struct_like.rb
|
252
253
|
- lib/gir_ffi/builders/type_builder.rb
|
253
254
|
- lib/gir_ffi/builders/unintrospectable_boxed_builder.rb
|
254
255
|
- lib/gir_ffi/builders/unintrospectable_builder.rb
|
@@ -300,14 +301,13 @@ files:
|
|
300
301
|
- lib/gir_ffi/signal_not_found_error.rb
|
301
302
|
- lib/gir_ffi/sized_array.rb
|
302
303
|
- lib/gir_ffi/struct_base.rb
|
304
|
+
- lib/gir_ffi/struct_like_base.rb
|
303
305
|
- lib/gir_ffi/type_base.rb
|
304
306
|
- lib/gir_ffi/type_map.rb
|
305
307
|
- lib/gir_ffi/unintrospectable_boxed_info.rb
|
306
308
|
- lib/gir_ffi/unintrospectable_signal_info.rb
|
307
309
|
- lib/gir_ffi/unintrospectable_type_info.rb
|
308
310
|
- lib/gir_ffi/union_base.rb
|
309
|
-
- lib/gir_ffi/user_data_argument_info.rb
|
310
|
-
- lib/gir_ffi/user_data_type_info.rb
|
311
311
|
- lib/gir_ffi/user_defined_property_info.rb
|
312
312
|
- lib/gir_ffi/user_defined_type_info.rb
|
313
313
|
- lib/gir_ffi/variable_name_generator.rb
|
@@ -333,6 +333,7 @@ files:
|
|
333
333
|
- test/ffi-gobject/gobject_test.rb
|
334
334
|
- test/ffi-gobject/object_class_test.rb
|
335
335
|
- test/ffi-gobject/object_test.rb
|
336
|
+
- test/ffi-gobject/param_spec_test.rb
|
336
337
|
- test/ffi-gobject/value_test.rb
|
337
338
|
- test/ffi-gobject_introspection/i_base_info_test.rb
|
338
339
|
- test/ffi-gobject_introspection/i_constant_info_test.rb
|
@@ -351,6 +352,7 @@ files:
|
|
351
352
|
- test/gir_ffi-base/glib/boolean_test.rb
|
352
353
|
- test/gir_ffi-base/glib/strv_test.rb
|
353
354
|
- test/gir_ffi/arg_helper_test.rb
|
355
|
+
- test/gir_ffi/boxed_base_test.rb
|
354
356
|
- test/gir_ffi/builder_test.rb
|
355
357
|
- test/gir_ffi/builders/argument_builder_test.rb
|
356
358
|
- test/gir_ffi/builders/base_argument_builder_test.rb
|
@@ -397,8 +399,10 @@ files:
|
|
397
399
|
- test/gir_ffi/object_base_test.rb
|
398
400
|
- test/gir_ffi/object_store_test.rb
|
399
401
|
- test/gir_ffi/sized_array_test.rb
|
402
|
+
- test/gir_ffi/struct_base_test.rb
|
400
403
|
- test/gir_ffi/type_map_test.rb
|
401
404
|
- test/gir_ffi/unintrospectable_type_info_test.rb
|
405
|
+
- test/gir_ffi/union_base_test.rb
|
402
406
|
- test/gir_ffi/user_defined_property_info_test.rb
|
403
407
|
- test/gir_ffi/user_defined_type_info_test.rb
|
404
408
|
- test/gir_ffi/variable_name_generator_test.rb
|
@@ -445,9 +449,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
445
449
|
version: 2.0.0
|
446
450
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
447
451
|
requirements:
|
448
|
-
- - "
|
452
|
+
- - ">"
|
449
453
|
- !ruby/object:Gem::Version
|
450
|
-
version:
|
454
|
+
version: 1.3.1
|
451
455
|
requirements: []
|
452
456
|
rubyforge_project:
|
453
457
|
rubygems_version: 2.5.1
|
data/lib/ffi-gobject/base.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Preload type contants
|
3
|
-
module GObject
|
4
|
-
TYPE_INVALID = type_from_name('invalid')
|
5
|
-
TYPE_NONE = type_from_name('void')
|
6
|
-
TYPE_INTERFACE = type_from_name('GInterface')
|
7
|
-
TYPE_CHAR = type_from_name('gchar')
|
8
|
-
TYPE_UCHAR = type_from_name('guchar')
|
9
|
-
TYPE_BOOLEAN = type_from_name('gboolean')
|
10
|
-
TYPE_INT = type_from_name('gint')
|
11
|
-
TYPE_UINT = type_from_name('guint')
|
12
|
-
TYPE_LONG = type_from_name('glong')
|
13
|
-
TYPE_ULONG = type_from_name('gulong')
|
14
|
-
TYPE_INT64 = type_from_name('gint64')
|
15
|
-
TYPE_UINT64 = type_from_name('guint64')
|
16
|
-
TYPE_ENUM = type_from_name('GEnum')
|
17
|
-
TYPE_FLAGS = type_from_name('GFlags')
|
18
|
-
TYPE_FLOAT = type_from_name('gfloat')
|
19
|
-
TYPE_DOUBLE = type_from_name('gdouble')
|
20
|
-
TYPE_STRING = type_from_name('gchararray')
|
21
|
-
TYPE_POINTER = type_from_name('gpointer')
|
22
|
-
TYPE_BOXED = type_from_name('GBoxed')
|
23
|
-
TYPE_PARAM = type_from_name('GParam')
|
24
|
-
TYPE_OBJECT = type_from_name('GObject')
|
25
|
-
TYPE_GTYPE = type_from_name('GType')
|
26
|
-
TYPE_VARIANT = type_from_name('GVariant')
|
27
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module GirFFI
|
3
|
-
# Class to represent the info for the user data argument of a signal handler.
|
4
|
-
# Implements the necessary parts of IArgumentInfo's interface.
|
5
|
-
class UserDataArgumentInfo
|
6
|
-
attr_reader :argument_type
|
7
|
-
|
8
|
-
def initialize(type)
|
9
|
-
@argument_type = type
|
10
|
-
end
|
11
|
-
|
12
|
-
def direction
|
13
|
-
:in
|
14
|
-
end
|
15
|
-
|
16
|
-
def skip?
|
17
|
-
false
|
18
|
-
end
|
19
|
-
|
20
|
-
def name
|
21
|
-
'_user_data'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require 'gir_ffi/info_ext/i_type_info'
|
3
|
-
|
4
|
-
module GirFFI
|
5
|
-
# Represents the type of the user data (closure argument) of a signal or vfunc,
|
6
|
-
# conforming, as needed, to the interface of GObjectIntrospection::ITypeInfo.
|
7
|
-
class UserDataTypeInfo
|
8
|
-
include InfoExt::ITypeInfo
|
9
|
-
|
10
|
-
def tag
|
11
|
-
:void
|
12
|
-
end
|
13
|
-
|
14
|
-
def pointer?
|
15
|
-
true
|
16
|
-
end
|
17
|
-
|
18
|
-
def array_length
|
19
|
-
-1
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|