gir_ffi 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -0
- data/README.rdoc +28 -14
- data/Rakefile +1 -1
- data/TODO.rdoc +3 -24
- data/examples/05_notification.rb +35 -0
- data/lib/gir_ffi/arg_helper.rb +15 -279
- data/lib/gir_ffi/builder/argument/base.rb +110 -0
- data/lib/gir_ffi/builder/argument/hash_table_base.rb +20 -0
- data/lib/gir_ffi/builder/argument/in_base.rb +19 -0
- data/lib/gir_ffi/builder/argument/in_out_base.rb +25 -0
- data/lib/gir_ffi/builder/argument/list_base.rb +16 -0
- data/lib/gir_ffi/builder/argument/out_base.rb +27 -0
- data/lib/gir_ffi/builder/argument.rb +167 -357
- data/lib/gir_ffi/builder/function.rb +2 -0
- data/lib/gir_ffi/builder/module.rb +2 -2
- data/lib/gir_ffi/builder/type/base.rb +7 -0
- data/lib/gir_ffi/builder/type/callback.rb +1 -8
- data/lib/gir_ffi/builder/type/constant.rb +1 -6
- data/lib/gir_ffi/builder/type/enum.rb +2 -7
- data/lib/gir_ffi/builder/type/interface.rb +12 -14
- data/lib/gir_ffi/builder/type/object.rb +32 -13
- data/lib/gir_ffi/builder/type/registered_type.rb +1 -78
- data/lib/gir_ffi/builder/type/struct.rb +2 -0
- data/lib/gir_ffi/builder/type/struct_based.rb +9 -24
- data/lib/gir_ffi/builder/type/unintrospectable.rb +63 -0
- data/lib/gir_ffi/builder/type/union.rb +8 -7
- data/lib/gir_ffi/builder/type/with_layout.rb +43 -0
- data/lib/gir_ffi/builder/type/with_methods.rb +61 -0
- data/lib/gir_ffi/builder.rb +39 -0
- data/lib/gir_ffi/callback_helper.rb +58 -0
- data/lib/gir_ffi/class_base.rb +17 -5
- data/lib/gir_ffi/i_repository.rb +0 -4
- data/lib/gir_ffi/in_out_pointer.rb +76 -0
- data/lib/gir_ffi/in_pointer.rb +46 -0
- data/lib/gir_ffi/interface_base.rb +12 -0
- data/lib/gir_ffi/module_base.rb +7 -3
- data/lib/gir_ffi/overrides/glib.rb +14 -3
- data/lib/gir_ffi/overrides/gobject.rb +37 -15
- data/lib/gir_ffi/overrides/gtk.rb +1 -1
- data/lib/gir_ffi/version.rb +1 -1
- data/lib/gir_ffi.rb +3 -0
- data/tasks/rdoc.rake +6 -0
- data/tasks/test.rake +22 -3
- data/tasks/yardoc.rake +6 -0
- data/test/arg_helper_test.rb +2 -72
- data/test/builder_test.rb +15 -19
- data/test/function_definition_builder_test.rb +30 -37
- data/test/g_object_overrides_test.rb +29 -1
- data/test/glib_overrides_test.rb +4 -0
- data/test/gtk_overrides_test.rb +21 -15
- data/test/i_repository_test.rb +2 -1
- data/test/{generated_gimarshallingtests_test.rb → integration/generated_gimarshallingtests_test.rb} +1 -1
- data/test/integration/generated_gio_test.rb +98 -0
- data/test/integration/generated_gobject_test.rb +30 -0
- data/test/{generated_gtk_test.rb → integration/generated_gtk_test.rb} +5 -5
- data/test/{generated_regress_test.rb → integration/generated_regress_test.rb} +19 -5
- data/test/interface_type_builder_test.rb +1 -1
- data/test/module_builder_test.rb +3 -3
- data/test/test_helper.rb +4 -9
- data/test/type_builder_test.rb +5 -5
- data/test/{dynamic_type_builder_test.rb → unintrospectable_type_builder_test.rb} +12 -8
- data/test/unit/builder_test.rb +31 -0
- data/test/unit/callback_helper_test.rb +19 -0
- data/test/unit/constant_builder_test.rb +5 -0
- data/test/unit/i_constant_info_test.rb +17 -0
- data/test/unit/in_out_pointer_test.rb +118 -0
- data/test/unit/in_pointer_test.rb +69 -0
- data/test/unit/object_type_builder_test.rb +20 -0
- metadata +47 -19
- data/lib/gir_ffi/builder/dynamic_type.rb +0 -41
- data/test/generated_gio_test.rb +0 -39
- data/test/generated_gobject_test.rb +0 -15
- data/test/object_type_builder_test.rb +0 -34
@@ -0,0 +1,25 @@
|
|
1
|
+
module GirFFI
|
2
|
+
module Builder
|
3
|
+
module Argument
|
4
|
+
# Abstract base class implementing argument processing for arguments
|
5
|
+
# with direction :inout.
|
6
|
+
class InOutBase < Base
|
7
|
+
def prepare
|
8
|
+
@name = safe(@arginfo.name)
|
9
|
+
@inarg = @name
|
10
|
+
end
|
11
|
+
|
12
|
+
def callarg
|
13
|
+
@callarg ||= @function_builder.new_var
|
14
|
+
end
|
15
|
+
|
16
|
+
def retname
|
17
|
+
@retname ||= @function_builder.new_var
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module GirFFI
|
2
|
+
module Builder
|
3
|
+
module Argument
|
4
|
+
# Abstract base class implementing argument processing for arguments
|
5
|
+
# with direction :out.
|
6
|
+
class OutBase < Base
|
7
|
+
def prepare
|
8
|
+
@name = safe(@arginfo.name)
|
9
|
+
end
|
10
|
+
|
11
|
+
def callarg
|
12
|
+
@callarg ||= @function_builder.new_var
|
13
|
+
end
|
14
|
+
|
15
|
+
def retname
|
16
|
+
@retname ||= @function_builder.new_var
|
17
|
+
end
|
18
|
+
|
19
|
+
def pre
|
20
|
+
[ "#{callarg} = GirFFI::InOutPointer.for #{base_type.inspect}" ]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
|