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.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +41 -0
  3. data/README.md +5 -6
  4. data/TODO.md +14 -35
  5. data/docs/Documentation.md +6 -0
  6. data/docs/Subclassing.md +38 -0
  7. data/lib/ffi-glib.rb +8 -3
  8. data/lib/ffi-glib/byte_array.rb +2 -1
  9. data/lib/ffi-glib/container_class_methods.rb +1 -3
  10. data/lib/ffi-glib/destroy_notify.rb +2 -2
  11. data/lib/ffi-glib/hash_table.rb +1 -2
  12. data/lib/ffi-glib/list.rb +11 -5
  13. data/lib/ffi-glib/list_methods.rb +12 -0
  14. data/lib/ffi-glib/s_list.rb +10 -4
  15. data/lib/ffi-gobject.rb +2 -5
  16. data/lib/ffi-gobject/object.rb +102 -92
  17. data/lib/ffi-gobject/object_class.rb +1 -1
  18. data/lib/ffi-gobject/ruby_closure.rb +1 -1
  19. data/lib/ffi-gobject/value.rb +108 -117
  20. data/lib/ffi-gobject_introspection/i_base_info.rb +35 -27
  21. data/lib/gir_ffi-base/gobject/lib.rb +4 -0
  22. data/lib/gir_ffi/array_element_convertor.rb +3 -4
  23. data/lib/gir_ffi/boxed_base.rb +13 -11
  24. data/lib/gir_ffi/builder.rb +3 -4
  25. data/lib/gir_ffi/builder_helper.rb +10 -2
  26. data/lib/gir_ffi/builders/base_argument_builder.rb +2 -2
  27. data/lib/gir_ffi/builders/base_method_builder.rb +1 -1
  28. data/lib/gir_ffi/builders/base_type_builder.rb +1 -1
  29. data/lib/gir_ffi/builders/callback_argument_builder.rb +2 -0
  30. data/lib/gir_ffi/builders/callback_builder.rb +25 -11
  31. data/lib/gir_ffi/builders/callback_return_value_builder.rb +4 -6
  32. data/lib/gir_ffi/builders/enum_builder.rb +9 -5
  33. data/lib/gir_ffi/builders/field_builder.rb +2 -1
  34. data/lib/gir_ffi/builders/function_builder.rb +1 -1
  35. data/lib/gir_ffi/builders/interface_builder.rb +3 -1
  36. data/lib/gir_ffi/builders/mapping_method_builder.rb +1 -1
  37. data/lib/gir_ffi/builders/marshalling_method_builder.rb +5 -2
  38. data/lib/gir_ffi/builders/method_template.rb +4 -4
  39. data/lib/gir_ffi/builders/module_builder.rb +4 -2
  40. data/lib/gir_ffi/builders/null_argument_builder.rb +0 -2
  41. data/lib/gir_ffi/builders/null_return_value_builder.rb +0 -2
  42. data/lib/gir_ffi/builders/object_builder.rb +18 -6
  43. data/lib/gir_ffi/builders/property_builder.rb +1 -2
  44. data/lib/gir_ffi/builders/signal_closure_builder.rb +3 -5
  45. data/lib/gir_ffi/builders/struct_builder.rb +34 -7
  46. data/lib/gir_ffi/builders/user_defined_builder.rb +8 -1
  47. data/lib/gir_ffi/builders/vfunc_argument_builder.rb +1 -1
  48. data/lib/gir_ffi/callback_base.rb +7 -8
  49. data/lib/gir_ffi/class_base.rb +1 -0
  50. data/lib/gir_ffi/core.rb +17 -2
  51. data/lib/gir_ffi/glib_error.rb +1 -2
  52. data/lib/gir_ffi/in_pointer.rb +10 -2
  53. data/lib/gir_ffi/interface_base.rb +5 -0
  54. data/lib/gir_ffi/object_base.rb +27 -0
  55. data/lib/gir_ffi/return_value_info.rb +1 -2
  56. data/lib/gir_ffi/struct_base.rb +1 -9
  57. data/lib/gir_ffi/struct_like_base.rb +9 -5
  58. data/lib/gir_ffi/type_map.rb +1 -0
  59. data/lib/gir_ffi/unintrospectable_type_info.rb +1 -1
  60. data/lib/gir_ffi/union_base.rb +1 -9
  61. data/lib/gir_ffi/user_defined_object_info.rb +3 -2
  62. data/lib/gir_ffi/version.rb +1 -1
  63. data/lib/gir_ffi/vfunc_implementation.rb +1 -0
  64. metadata +106 -143
  65. data/Gemfile +0 -14
  66. data/Rakefile +0 -9
  67. data/tasks/test.rake +0 -204
  68. data/test/base_test_helper.rb +0 -70
  69. data/test/ffi-glib/array_test.rb +0 -203
  70. data/test/ffi-glib/byte_array_test.rb +0 -28
  71. data/test/ffi-glib/bytes_test.rb +0 -61
  72. data/test/ffi-glib/closure_test.rb +0 -38
  73. data/test/ffi-glib/destroy_notify_test.rb +0 -18
  74. data/test/ffi-glib/hash_table_test.rb +0 -68
  75. data/test/ffi-glib/list_test.rb +0 -86
  76. data/test/ffi-glib/main_loop_test.rb +0 -53
  77. data/test/ffi-glib/ptr_array_test.rb +0 -112
  78. data/test/ffi-glib/ruby_closure_test.rb +0 -62
  79. data/test/ffi-glib/s_list_test.rb +0 -76
  80. data/test/ffi-glib/strv_test.rb +0 -60
  81. data/test/ffi-glib/variant_test.rb +0 -12
  82. data/test/ffi-gobject/gobject_test.rb +0 -76
  83. data/test/ffi-gobject/object_class_test.rb +0 -31
  84. data/test/ffi-gobject/object_test.rb +0 -122
  85. data/test/ffi-gobject/param_spec_test.rb +0 -32
  86. data/test/ffi-gobject/value_test.rb +0 -390
  87. data/test/ffi-gobject_introspection/gobject_type_init_test.rb +0 -26
  88. data/test/ffi-gobject_introspection/i_base_info_test.rb +0 -52
  89. data/test/ffi-gobject_introspection/i_constant_info_test.rb +0 -29
  90. data/test/ffi-gobject_introspection/i_enum_info_test.rb +0 -18
  91. data/test/ffi-gobject_introspection/i_function_info_test.rb +0 -6
  92. data/test/ffi-gobject_introspection/i_interface_info_test.rb +0 -23
  93. data/test/ffi-gobject_introspection/i_object_info_test.rb +0 -49
  94. data/test/ffi-gobject_introspection/i_property_info_test.rb +0 -47
  95. data/test/ffi-gobject_introspection/i_registered_type_info_test.rb +0 -27
  96. data/test/ffi-gobject_introspection/i_repository_test.rb +0 -81
  97. data/test/ffi-gobject_introspection/i_struct_info_test.rb +0 -23
  98. data/test/ffi-gobject_introspection/i_type_info_test.rb +0 -30
  99. data/test/ffi-gobject_introspection/i_union_info_test.rb +0 -17
  100. data/test/ffi-gobject_introspection/i_vfunc_info_test.rb +0 -41
  101. data/test/ffi-gobject_introspection/lib_test.rb +0 -13
  102. data/test/ffi-gobject_introspection/strv_test.rb +0 -46
  103. data/test/ffi-gobject_test.rb +0 -151
  104. data/test/gir_ffi/allocation_helper_test.rb +0 -36
  105. data/test/gir_ffi/arg_helper_test.rb +0 -139
  106. data/test/gir_ffi/boolean_test.rb +0 -43
  107. data/test/gir_ffi/boxed_base_test.rb +0 -65
  108. data/test/gir_ffi/builder_test.rb +0 -322
  109. data/test/gir_ffi/builders/argument_builder_test.rb +0 -651
  110. data/test/gir_ffi/builders/base_argument_builder_test.rb +0 -6
  111. data/test/gir_ffi/builders/callback_argument_builder_test.rb +0 -126
  112. data/test/gir_ffi/builders/callback_builder_test.rb +0 -117
  113. data/test/gir_ffi/builders/callback_return_value_builder_test.rb +0 -81
  114. data/test/gir_ffi/builders/constant_builder_test.rb +0 -6
  115. data/test/gir_ffi/builders/constructor_builder_test.rb +0 -37
  116. data/test/gir_ffi/builders/enum_builder_test.rb +0 -23
  117. data/test/gir_ffi/builders/field_builder_test.rb +0 -134
  118. data/test/gir_ffi/builders/function_builder_test.rb +0 -550
  119. data/test/gir_ffi/builders/initializer_builder_test.rb +0 -54
  120. data/test/gir_ffi/builders/interface_builder_test.rb +0 -32
  121. data/test/gir_ffi/builders/module_builder_test.rb +0 -43
  122. data/test/gir_ffi/builders/object_builder_test.rb +0 -98
  123. data/test/gir_ffi/builders/property_builder_test.rb +0 -158
  124. data/test/gir_ffi/builders/registered_type_builder_test.rb +0 -54
  125. data/test/gir_ffi/builders/return_value_builder_test.rb +0 -433
  126. data/test/gir_ffi/builders/signal_closure_builder_test.rb +0 -197
  127. data/test/gir_ffi/builders/struct_builder_test.rb +0 -93
  128. data/test/gir_ffi/builders/unintrospectable_boxed_builder_test.rb +0 -29
  129. data/test/gir_ffi/builders/unintrospectable_builder_test.rb +0 -84
  130. data/test/gir_ffi/builders/union_builder_test.rb +0 -28
  131. data/test/gir_ffi/builders/user_defined_builder_test.rb +0 -524
  132. data/test/gir_ffi/builders/vfunc_argument_builder_test.rb +0 -101
  133. data/test/gir_ffi/builders/vfunc_builder_test.rb +0 -241
  134. data/test/gir_ffi/callback_base_test.rb +0 -22
  135. data/test/gir_ffi/class_base_test.rb +0 -166
  136. data/test/gir_ffi/core_test.rb +0 -98
  137. data/test/gir_ffi/enum_base_test.rb +0 -43
  138. data/test/gir_ffi/error_type_info_test.rb +0 -50
  139. data/test/gir_ffi/ffi_ext/pointer_test.rb +0 -20
  140. data/test/gir_ffi/g_type_test.rb +0 -31
  141. data/test/gir_ffi/in_pointer_test.rb +0 -203
  142. data/test/gir_ffi/info_ext/i_callable_info_test.rb +0 -26
  143. data/test/gir_ffi/info_ext/i_callback_info_test.rb +0 -21
  144. data/test/gir_ffi/info_ext/i_field_info_test.rb +0 -37
  145. data/test/gir_ffi/info_ext/i_function_info_test.rb +0 -74
  146. data/test/gir_ffi/info_ext/i_signal_info_test.rb +0 -32
  147. data/test/gir_ffi/info_ext/i_type_info_test.rb +0 -711
  148. data/test/gir_ffi/info_ext/i_unresolved_info_test.rb +0 -19
  149. data/test/gir_ffi/info_ext/safe_constant_name_test.rb +0 -26
  150. data/test/gir_ffi/info_ext/safe_function_name_test.rb +0 -26
  151. data/test/gir_ffi/interface_base_test.rb +0 -20
  152. data/test/gir_ffi/method_stubber_test.rb +0 -65
  153. data/test/gir_ffi/object_base_test.rb +0 -64
  154. data/test/gir_ffi/object_store_test.rb +0 -41
  155. data/test/gir_ffi/receiver_argument_info_test.rb +0 -33
  156. data/test/gir_ffi/sized_array_test.rb +0 -206
  157. data/test/gir_ffi/struct_base_test.rb +0 -23
  158. data/test/gir_ffi/struct_like_base_test.rb +0 -167
  159. data/test/gir_ffi/type_map_test.rb +0 -17
  160. data/test/gir_ffi/unintrospectable_type_info_test.rb +0 -121
  161. data/test/gir_ffi/union_base_test.rb +0 -23
  162. data/test/gir_ffi/user_defined_object_info_test.rb +0 -119
  163. data/test/gir_ffi/user_defined_property_info_test.rb +0 -39
  164. data/test/gir_ffi/variable_name_generator_test.rb +0 -18
  165. data/test/gir_ffi/version_test.rb +0 -9
  166. data/test/gir_ffi/zero_terminated_test.rb +0 -108
  167. data/test/gir_ffi_test_helper.rb +0 -84
  168. data/test/integration/callback_exceptions_test.rb +0 -59
  169. data/test/integration/derived_classes_test.rb +0 -53
  170. data/test/integration/generated_everything_test.rb +0 -452
  171. data/test/integration/generated_gimarshallingtests_test.rb +0 -3096
  172. data/test/integration/generated_gio_test.rb +0 -116
  173. data/test/integration/generated_glib_test.rb +0 -10
  174. data/test/integration/generated_gobject_test.rb +0 -124
  175. data/test/integration/generated_gst_test.rb +0 -38
  176. data/test/integration/generated_gtk_source_test.rb +0 -32
  177. data/test/integration/generated_gtop_test.rb +0 -22
  178. data/test/integration/generated_pango_ft2_test.rb +0 -17
  179. data/test/integration/generated_pango_test.rb +0 -24
  180. data/test/integration/generated_regress_test.rb +0 -4062
  181. data/test/integration/generated_secret_test.rb +0 -14
  182. data/test/integration/generated_utility_test.rb +0 -174
  183. data/test/integration/generated_warnlib_test.rb +0 -43
  184. data/test/integration/method_lookup_test.rb +0 -34
  185. data/test/introspection_test_helper.rb +0 -93
  186. data/test/lib/Makefile.am +0 -110
  187. data/test/lib/autogen.sh +0 -4
  188. data/test/lib/configure.ac +0 -34
  189. data/test/lib/m4/jhflags.m4 +0 -21
  190. data/test/minitest/stats_plugin.rb +0 -30
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- # Run this to generate all the initial makefiles, etc.
3
-
4
- autoreconf -ivf
@@ -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
@@ -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