gir_ffi 0.15.2 → 0.15.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +41 -0
- data/README.md +5 -6
- data/TODO.md +14 -35
- data/docs/Documentation.md +6 -0
- data/docs/Subclassing.md +38 -0
- data/lib/ffi-glib.rb +8 -3
- data/lib/ffi-glib/byte_array.rb +2 -1
- data/lib/ffi-glib/container_class_methods.rb +1 -3
- data/lib/ffi-glib/destroy_notify.rb +2 -2
- data/lib/ffi-glib/hash_table.rb +1 -2
- data/lib/ffi-glib/list.rb +11 -5
- data/lib/ffi-glib/list_methods.rb +12 -0
- data/lib/ffi-glib/s_list.rb +10 -4
- data/lib/ffi-gobject.rb +2 -5
- data/lib/ffi-gobject/object.rb +102 -92
- data/lib/ffi-gobject/object_class.rb +1 -1
- data/lib/ffi-gobject/ruby_closure.rb +1 -1
- data/lib/ffi-gobject/value.rb +108 -117
- data/lib/ffi-gobject_introspection/i_base_info.rb +35 -27
- data/lib/gir_ffi-base/gobject/lib.rb +4 -0
- data/lib/gir_ffi/array_element_convertor.rb +3 -4
- data/lib/gir_ffi/boxed_base.rb +13 -11
- data/lib/gir_ffi/builder.rb +3 -4
- data/lib/gir_ffi/builder_helper.rb +10 -2
- data/lib/gir_ffi/builders/base_argument_builder.rb +2 -2
- data/lib/gir_ffi/builders/base_method_builder.rb +1 -1
- data/lib/gir_ffi/builders/base_type_builder.rb +1 -1
- data/lib/gir_ffi/builders/callback_argument_builder.rb +2 -0
- data/lib/gir_ffi/builders/callback_builder.rb +25 -11
- data/lib/gir_ffi/builders/callback_return_value_builder.rb +4 -6
- data/lib/gir_ffi/builders/enum_builder.rb +9 -5
- data/lib/gir_ffi/builders/field_builder.rb +2 -1
- data/lib/gir_ffi/builders/function_builder.rb +1 -1
- data/lib/gir_ffi/builders/interface_builder.rb +3 -1
- data/lib/gir_ffi/builders/mapping_method_builder.rb +1 -1
- data/lib/gir_ffi/builders/marshalling_method_builder.rb +5 -2
- data/lib/gir_ffi/builders/method_template.rb +4 -4
- data/lib/gir_ffi/builders/module_builder.rb +4 -2
- data/lib/gir_ffi/builders/null_argument_builder.rb +0 -2
- data/lib/gir_ffi/builders/null_return_value_builder.rb +0 -2
- data/lib/gir_ffi/builders/object_builder.rb +18 -6
- data/lib/gir_ffi/builders/property_builder.rb +1 -2
- data/lib/gir_ffi/builders/signal_closure_builder.rb +3 -5
- data/lib/gir_ffi/builders/struct_builder.rb +34 -7
- data/lib/gir_ffi/builders/user_defined_builder.rb +8 -1
- data/lib/gir_ffi/builders/vfunc_argument_builder.rb +1 -1
- data/lib/gir_ffi/callback_base.rb +7 -8
- data/lib/gir_ffi/class_base.rb +1 -0
- data/lib/gir_ffi/core.rb +17 -2
- data/lib/gir_ffi/glib_error.rb +1 -2
- data/lib/gir_ffi/in_pointer.rb +10 -2
- data/lib/gir_ffi/interface_base.rb +5 -0
- data/lib/gir_ffi/object_base.rb +27 -0
- data/lib/gir_ffi/return_value_info.rb +1 -2
- data/lib/gir_ffi/struct_base.rb +1 -9
- data/lib/gir_ffi/struct_like_base.rb +9 -5
- data/lib/gir_ffi/type_map.rb +1 -0
- data/lib/gir_ffi/unintrospectable_type_info.rb +1 -1
- data/lib/gir_ffi/union_base.rb +1 -9
- data/lib/gir_ffi/user_defined_object_info.rb +3 -2
- data/lib/gir_ffi/version.rb +1 -1
- data/lib/gir_ffi/vfunc_implementation.rb +1 -0
- metadata +106 -143
- data/Gemfile +0 -14
- data/Rakefile +0 -9
- data/tasks/test.rake +0 -204
- data/test/base_test_helper.rb +0 -70
- data/test/ffi-glib/array_test.rb +0 -203
- data/test/ffi-glib/byte_array_test.rb +0 -28
- data/test/ffi-glib/bytes_test.rb +0 -61
- data/test/ffi-glib/closure_test.rb +0 -38
- data/test/ffi-glib/destroy_notify_test.rb +0 -18
- data/test/ffi-glib/hash_table_test.rb +0 -68
- data/test/ffi-glib/list_test.rb +0 -86
- data/test/ffi-glib/main_loop_test.rb +0 -53
- data/test/ffi-glib/ptr_array_test.rb +0 -112
- data/test/ffi-glib/ruby_closure_test.rb +0 -62
- data/test/ffi-glib/s_list_test.rb +0 -76
- data/test/ffi-glib/strv_test.rb +0 -60
- data/test/ffi-glib/variant_test.rb +0 -12
- data/test/ffi-gobject/gobject_test.rb +0 -76
- data/test/ffi-gobject/object_class_test.rb +0 -31
- data/test/ffi-gobject/object_test.rb +0 -122
- data/test/ffi-gobject/param_spec_test.rb +0 -32
- data/test/ffi-gobject/value_test.rb +0 -390
- data/test/ffi-gobject_introspection/gobject_type_init_test.rb +0 -26
- data/test/ffi-gobject_introspection/i_base_info_test.rb +0 -52
- data/test/ffi-gobject_introspection/i_constant_info_test.rb +0 -29
- data/test/ffi-gobject_introspection/i_enum_info_test.rb +0 -18
- data/test/ffi-gobject_introspection/i_function_info_test.rb +0 -6
- data/test/ffi-gobject_introspection/i_interface_info_test.rb +0 -23
- data/test/ffi-gobject_introspection/i_object_info_test.rb +0 -49
- data/test/ffi-gobject_introspection/i_property_info_test.rb +0 -47
- data/test/ffi-gobject_introspection/i_registered_type_info_test.rb +0 -27
- data/test/ffi-gobject_introspection/i_repository_test.rb +0 -81
- data/test/ffi-gobject_introspection/i_struct_info_test.rb +0 -23
- data/test/ffi-gobject_introspection/i_type_info_test.rb +0 -30
- data/test/ffi-gobject_introspection/i_union_info_test.rb +0 -17
- data/test/ffi-gobject_introspection/i_vfunc_info_test.rb +0 -41
- data/test/ffi-gobject_introspection/lib_test.rb +0 -13
- data/test/ffi-gobject_introspection/strv_test.rb +0 -46
- data/test/ffi-gobject_test.rb +0 -151
- data/test/gir_ffi/allocation_helper_test.rb +0 -36
- data/test/gir_ffi/arg_helper_test.rb +0 -139
- data/test/gir_ffi/boolean_test.rb +0 -43
- data/test/gir_ffi/boxed_base_test.rb +0 -65
- data/test/gir_ffi/builder_test.rb +0 -322
- data/test/gir_ffi/builders/argument_builder_test.rb +0 -651
- data/test/gir_ffi/builders/base_argument_builder_test.rb +0 -6
- data/test/gir_ffi/builders/callback_argument_builder_test.rb +0 -126
- data/test/gir_ffi/builders/callback_builder_test.rb +0 -117
- data/test/gir_ffi/builders/callback_return_value_builder_test.rb +0 -81
- data/test/gir_ffi/builders/constant_builder_test.rb +0 -6
- data/test/gir_ffi/builders/constructor_builder_test.rb +0 -37
- data/test/gir_ffi/builders/enum_builder_test.rb +0 -23
- data/test/gir_ffi/builders/field_builder_test.rb +0 -134
- data/test/gir_ffi/builders/function_builder_test.rb +0 -550
- data/test/gir_ffi/builders/initializer_builder_test.rb +0 -54
- data/test/gir_ffi/builders/interface_builder_test.rb +0 -32
- data/test/gir_ffi/builders/module_builder_test.rb +0 -43
- data/test/gir_ffi/builders/object_builder_test.rb +0 -98
- data/test/gir_ffi/builders/property_builder_test.rb +0 -158
- data/test/gir_ffi/builders/registered_type_builder_test.rb +0 -54
- data/test/gir_ffi/builders/return_value_builder_test.rb +0 -433
- data/test/gir_ffi/builders/signal_closure_builder_test.rb +0 -197
- data/test/gir_ffi/builders/struct_builder_test.rb +0 -93
- data/test/gir_ffi/builders/unintrospectable_boxed_builder_test.rb +0 -29
- data/test/gir_ffi/builders/unintrospectable_builder_test.rb +0 -84
- data/test/gir_ffi/builders/union_builder_test.rb +0 -28
- data/test/gir_ffi/builders/user_defined_builder_test.rb +0 -524
- data/test/gir_ffi/builders/vfunc_argument_builder_test.rb +0 -101
- data/test/gir_ffi/builders/vfunc_builder_test.rb +0 -241
- data/test/gir_ffi/callback_base_test.rb +0 -22
- data/test/gir_ffi/class_base_test.rb +0 -166
- data/test/gir_ffi/core_test.rb +0 -98
- data/test/gir_ffi/enum_base_test.rb +0 -43
- data/test/gir_ffi/error_type_info_test.rb +0 -50
- data/test/gir_ffi/ffi_ext/pointer_test.rb +0 -20
- data/test/gir_ffi/g_type_test.rb +0 -31
- data/test/gir_ffi/in_pointer_test.rb +0 -203
- data/test/gir_ffi/info_ext/i_callable_info_test.rb +0 -26
- data/test/gir_ffi/info_ext/i_callback_info_test.rb +0 -21
- data/test/gir_ffi/info_ext/i_field_info_test.rb +0 -37
- data/test/gir_ffi/info_ext/i_function_info_test.rb +0 -74
- data/test/gir_ffi/info_ext/i_signal_info_test.rb +0 -32
- data/test/gir_ffi/info_ext/i_type_info_test.rb +0 -711
- data/test/gir_ffi/info_ext/i_unresolved_info_test.rb +0 -19
- data/test/gir_ffi/info_ext/safe_constant_name_test.rb +0 -26
- data/test/gir_ffi/info_ext/safe_function_name_test.rb +0 -26
- data/test/gir_ffi/interface_base_test.rb +0 -20
- data/test/gir_ffi/method_stubber_test.rb +0 -65
- data/test/gir_ffi/object_base_test.rb +0 -64
- data/test/gir_ffi/object_store_test.rb +0 -41
- data/test/gir_ffi/receiver_argument_info_test.rb +0 -33
- data/test/gir_ffi/sized_array_test.rb +0 -206
- data/test/gir_ffi/struct_base_test.rb +0 -23
- data/test/gir_ffi/struct_like_base_test.rb +0 -167
- data/test/gir_ffi/type_map_test.rb +0 -17
- data/test/gir_ffi/unintrospectable_type_info_test.rb +0 -121
- data/test/gir_ffi/union_base_test.rb +0 -23
- data/test/gir_ffi/user_defined_object_info_test.rb +0 -119
- data/test/gir_ffi/user_defined_property_info_test.rb +0 -39
- data/test/gir_ffi/variable_name_generator_test.rb +0 -18
- data/test/gir_ffi/version_test.rb +0 -9
- data/test/gir_ffi/zero_terminated_test.rb +0 -108
- data/test/gir_ffi_test_helper.rb +0 -84
- data/test/integration/callback_exceptions_test.rb +0 -59
- data/test/integration/derived_classes_test.rb +0 -53
- data/test/integration/generated_everything_test.rb +0 -452
- data/test/integration/generated_gimarshallingtests_test.rb +0 -3096
- data/test/integration/generated_gio_test.rb +0 -116
- data/test/integration/generated_glib_test.rb +0 -10
- data/test/integration/generated_gobject_test.rb +0 -124
- data/test/integration/generated_gst_test.rb +0 -38
- data/test/integration/generated_gtk_source_test.rb +0 -32
- data/test/integration/generated_gtop_test.rb +0 -22
- data/test/integration/generated_pango_ft2_test.rb +0 -17
- data/test/integration/generated_pango_test.rb +0 -24
- data/test/integration/generated_regress_test.rb +0 -4062
- data/test/integration/generated_secret_test.rb +0 -14
- data/test/integration/generated_utility_test.rb +0 -174
- data/test/integration/generated_warnlib_test.rb +0 -43
- data/test/integration/method_lookup_test.rb +0 -34
- data/test/introspection_test_helper.rb +0 -93
- data/test/lib/Makefile.am +0 -110
- data/test/lib/autogen.sh +0 -4
- data/test/lib/configure.ac +0 -34
- data/test/lib/m4/jhflags.m4 +0 -21
- data/test/minitest/stats_plugin.rb +0 -30
data/test/lib/autogen.sh
DELETED
data/test/lib/configure.ac
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# -*- Autoconf -*-
|
2
|
-
# Process this file with autoconf to produce a configure script.
|
3
|
-
|
4
|
-
AC_PREREQ(2.59)
|
5
|
-
AC_INIT(dummy_test_lib, 0.0.1)
|
6
|
-
AC_CONFIG_MACRO_DIR([m4])
|
7
|
-
AM_INIT_AUTOMAKE([1.7 foreign])
|
8
|
-
AM_MAINTAINER_MODE
|
9
|
-
AM_CONFIG_HEADER([config.h])
|
10
|
-
|
11
|
-
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
|
12
|
-
|
13
|
-
# Checks for programs.
|
14
|
-
AC_PROG_CC
|
15
|
-
AM_PROG_CC_C_O
|
16
|
-
AC_PROG_LIBTOOL
|
17
|
-
PKG_PROG_PKG_CONFIG
|
18
|
-
|
19
|
-
if test "$GCC" = "yes"; then
|
20
|
-
JH_ADD_CFLAG([-Wall])
|
21
|
-
JH_ADD_CFLAG([-fno-strict-aliasing])
|
22
|
-
fi
|
23
|
-
|
24
|
-
PKG_CHECK_MODULES(GIO, [gio-2.0])
|
25
|
-
PKG_CHECK_MODULES(GLIB, [glib-2.0])
|
26
|
-
PKG_CHECK_MODULES(CAIRO, [cairo])
|
27
|
-
|
28
|
-
GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
|
29
|
-
AC_SUBST(GI_DATADIR)
|
30
|
-
AC_CHECK_FILE($GI_DATADIR/tests/annotation.c, have_annotation=true, have_annotation=false)
|
31
|
-
AM_CONDITIONAL(HAVE_EXTRA_TEST_FILES, test x$have_annotation = xtrue)
|
32
|
-
|
33
|
-
AC_CONFIG_FILES([Makefile])
|
34
|
-
AC_OUTPUT
|
data/test/lib/m4/jhflags.m4
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
dnl
|
2
|
-
dnl JH_ADD_CFLAG(FLAG)
|
3
|
-
dnl checks whether the C compiler supports the given flag, and if so, adds
|
4
|
-
dnl it to $CFLAGS. If the flag is already present in the list, then the
|
5
|
-
dnl check is not performed.
|
6
|
-
AC_DEFUN([JH_ADD_CFLAG],
|
7
|
-
[
|
8
|
-
case " $CFLAGS " in
|
9
|
-
*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
|
10
|
-
;;
|
11
|
-
*)
|
12
|
-
save_CFLAGS="$CFLAGS"
|
13
|
-
CFLAGS="$CFLAGS $1"
|
14
|
-
AC_MSG_CHECKING([whether [$]CC understands $1])
|
15
|
-
AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
|
16
|
-
AC_MSG_RESULT($jh_has_option)
|
17
|
-
if test $jh_has_option = no; then
|
18
|
-
CFLAGS="$save_CFLAGS"
|
19
|
-
fi
|
20
|
-
;;
|
21
|
-
esac])
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Minitest
|
4
|
-
class StatsReporter < AbstractReporter
|
5
|
-
def initialize(_options)
|
6
|
-
@results = []
|
7
|
-
end
|
8
|
-
|
9
|
-
def start
|
10
|
-
@current_time = Time.now
|
11
|
-
end
|
12
|
-
|
13
|
-
def record(result)
|
14
|
-
@results << result
|
15
|
-
end
|
16
|
-
|
17
|
-
def report
|
18
|
-
slowest = @results.sort_by(&:time).reverse.first(10)
|
19
|
-
slowest.each do |result|
|
20
|
-
puts format("%<time>10.4f %<location>s",
|
21
|
-
time: result.time,
|
22
|
-
location: result.location)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.plugin_stats_init(options)
|
28
|
-
reporter << StatsReporter.new(options)
|
29
|
-
end
|
30
|
-
end
|