glib2 3.3.9 → 3.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/Rakefile +6 -4
  4. data/ext/glib2/extconf.rb +1 -5
  5. data/ext/glib2/rbglib-bytes.c +1 -5
  6. data/ext/glib2/rbglib-gc.c +98 -52
  7. data/ext/glib2/rbglib-variant-type.c +1 -5
  8. data/ext/glib2/rbglib-variant.c +3 -5
  9. data/ext/glib2/rbglib.c +4 -0
  10. data/ext/glib2/rbglib.h +7 -4
  11. data/ext/glib2/rbglib_bookmarkfile.c +4 -4
  12. data/ext/glib2/rbglib_datetime.c +1 -5
  13. data/ext/glib2/rbglib_fileutils.c +1 -17
  14. data/ext/glib2/rbglib_iochannel.c +4 -4
  15. data/ext/glib2/rbglib_keyfile.c +16 -41
  16. data/ext/glib2/rbglib_maincontext.c +6 -32
  17. data/ext/glib2/rbglib_mainloop.c +2 -17
  18. data/ext/glib2/rbglib_matchinfo.c +1 -5
  19. data/ext/glib2/rbglib_pollfd.c +1 -25
  20. data/ext/glib2/rbglib_regex.c +1 -13
  21. data/ext/glib2/rbglib_source.c +1 -39
  22. data/ext/glib2/rbglib_spawn.c +5 -10
  23. data/ext/glib2/rbglib_spawnerror.c +2 -2
  24. data/ext/glib2/rbglib_threads.c +2 -15
  25. data/ext/glib2/rbglib_timezone.c +1 -5
  26. data/ext/glib2/rbglib_unichar.c +46 -5
  27. data/ext/glib2/rbglib_unicode.c +1 -18
  28. data/ext/glib2/rbglib_utils.c +1 -14
  29. data/ext/glib2/rbglib_win32.c +3 -7
  30. data/ext/glib2/rbgobj_binding.c +1 -7
  31. data/ext/glib2/rbgobj_closure.c +22 -9
  32. data/ext/glib2/rbgobj_object.c +113 -104
  33. data/ext/glib2/rbgobj_param.c +2 -8
  34. data/ext/glib2/rbgobj_paramspecs.c +6 -24
  35. data/ext/glib2/rbgobj_signal.c +81 -48
  36. data/ext/glib2/rbgobj_strv.c +2 -2
  37. data/ext/glib2/rbgobj_type.c +58 -68
  38. data/ext/glib2/rbgobj_value.c +3 -7
  39. data/ext/glib2/rbgobj_valuetypes.c +14 -62
  40. data/ext/glib2/rbgobject.c +4 -6
  41. data/ext/glib2/rbgobject.h +2 -27
  42. data/ext/glib2/rbgprivate.h +6 -6
  43. data/ext/glib2/rbgutil_callback.c +23 -26
  44. data/lib/glib2/deprecated.rb +22 -1
  45. data/lib/mkmf-gnome.rb +5 -5
  46. data/test/glib-test-utils.rb +18 -3
  47. data/test/run-test.rb +49 -14
  48. data/test/test-binding.rb +1 -11
  49. data/test/test-bytes.rb +1 -5
  50. data/test/test-date-time.rb +1 -3
  51. data/test/test-file-utils.rb +1 -32
  52. data/test/test-iochannel.rb +3 -5
  53. data/test/test-key-file.rb +5 -6
  54. data/test/test-match-info.rb +1 -5
  55. data/test/test-regex.rb +1 -5
  56. data/test/test-source.rb +1 -14
  57. data/test/test-spawn.rb +2 -1
  58. data/test/test-time-zone.rb +1 -5
  59. data/test/test-timeout.rb +2 -3
  60. data/test/test-unicode.rb +16 -12
  61. data/test/test-utils.rb +2 -8
  62. data/test/test-variant-type.rb +1 -3
  63. data/test/test-win32.rb +6 -6
  64. metadata +3 -8
  65. data/ext/glib2/glib-enum-types.c +0 -1233
  66. data/ext/glib2/glib-enum-types.h +0 -154
  67. data/ext/glib2/rbgobj_valuearray.c +0 -100
  68. data/test/glib-test-init.rb +0 -21
@@ -1,154 +0,0 @@
1
-
2
- /* Generated by glib-mkenums.rb ($Id$) */
3
-
4
- #ifndef __GLIB_ENUM_TYPES_H__
5
- #define __GLIB_ENUM_TYPES_H__
6
-
7
- #include <glib-object.h>
8
-
9
- G_BEGIN_DECLS
10
-
11
- /* enumerations from "/usr/include/glib-2.0/glib/gvariant.h" */
12
- GType g_variant_class_get_type (void);
13
- #define G_TYPE_VARIANT_CLASS (g_variant_class_get_type())
14
- GType g_variant_parse_error_get_type (void);
15
- #define G_TYPE_VARIANT_PARSE_ERROR (g_variant_parse_error_get_type())
16
-
17
- /* enumerations from "/usr/include/glib-2.0/glib/gspawn.h" */
18
- GType g_spawn_error_get_type (void);
19
- #define G_TYPE_SPAWN_ERROR (g_spawn_error_get_type())
20
- GType g_spawn_flags_get_type (void);
21
- #define G_TYPE_SPAWN_FLAGS (g_spawn_flags_get_type())
22
-
23
- /* enumerations from "/usr/include/glib-2.0/glib/gkeyfile.h" */
24
- GType g_key_file_error_get_type (void);
25
- #define G_TYPE_KEY_FILE_ERROR (g_key_file_error_get_type())
26
- GType g_key_file_flags_get_type (void);
27
- #define G_TYPE_KEY_FILE_FLAGS (g_key_file_flags_get_type())
28
-
29
- /* enumerations from "/usr/include/glib-2.0/glib/gnode.h" */
30
- GType g_traverse_flags_get_type (void);
31
- #define G_TYPE_TRAVERSE_FLAGS (g_traverse_flags_get_type())
32
- GType g_traverse_type_get_type (void);
33
- #define G_TYPE_TRAVERSE_TYPE (g_traverse_type_get_type())
34
-
35
- /* enumerations from "/usr/include/glib-2.0/glib/gshell.h" */
36
- GType g_shell_error_get_type (void);
37
- #define G_TYPE_SHELL_ERROR (g_shell_error_get_type())
38
-
39
- /* enumerations from "/usr/include/glib-2.0/glib/gslice.h" */
40
- GType g_slice_config_get_type (void);
41
- #define G_TYPE_SLICE_CONFIG (g_slice_config_get_type())
42
-
43
- /* enumerations from "/usr/include/glib-2.0/glib/gregex.h" */
44
- GType g_regex_error_get_type (void);
45
- #define G_TYPE_REGEX_ERROR (g_regex_error_get_type())
46
- GType g_regex_compile_flags_get_type (void);
47
- #define G_TYPE_REGEX_COMPILE_FLAGS (g_regex_compile_flags_get_type())
48
- GType g_regex_match_flags_get_type (void);
49
- #define G_TYPE_REGEX_MATCH_FLAGS (g_regex_match_flags_get_type())
50
-
51
- /* enumerations from "/usr/include/glib-2.0/glib/gmarkup.h" */
52
- GType g_markup_error_get_type (void);
53
- #define G_TYPE_MARKUP_ERROR (g_markup_error_get_type())
54
- GType g_markup_parse_flags_get_type (void);
55
- #define G_TYPE_MARKUP_PARSE_FLAGS (g_markup_parse_flags_get_type())
56
- GType g_markup_collect_type_get_type (void);
57
- #define G_TYPE_MARKUP_COLLECT_TYPE (g_markup_collect_type_get_type())
58
-
59
- /* enumerations from "/usr/include/glib-2.0/glib/gtestutils.h" */
60
- GType g_test_trap_flags_get_type (void);
61
- #define G_TYPE_TEST_TRAP_FLAGS (g_test_trap_flags_get_type())
62
- GType g_test_subprocess_flags_get_type (void);
63
- #define G_TYPE_TEST_SUBPROCESS_FLAGS (g_test_subprocess_flags_get_type())
64
- GType g_test_log_type_get_type (void);
65
- #define G_TYPE_TEST_LOG_TYPE (g_test_log_type_get_type())
66
- GType g_test_file_type_get_type (void);
67
- #define G_TYPE_TEST_FILE_TYPE (g_test_file_type_get_type())
68
-
69
- /* enumerations from "/usr/include/glib-2.0/glib/gfileutils.h" */
70
- GType g_file_error_get_type (void);
71
- #define G_TYPE_FILE_ERROR (g_file_error_get_type())
72
- GType g_file_test_get_type (void);
73
- #define G_TYPE_FILE_TEST (g_file_test_get_type())
74
-
75
- /* enumerations from "/usr/include/glib-2.0/glib/gtimezone.h" */
76
- GType g_time_type_get_type (void);
77
- #define G_TYPE_TIME_TYPE (g_time_type_get_type())
78
-
79
- /* enumerations from "/usr/include/glib-2.0/glib/gdate.h" */
80
- GType g_date_dm_y_get_type (void);
81
- #define G_TYPE_DATE_DM_Y (g_date_dm_y_get_type())
82
- GType g_date_weekday_get_type (void);
83
- #define G_TYPE_DATE_WEEKDAY (g_date_weekday_get_type())
84
- GType g_date_month_get_type (void);
85
- #define G_TYPE_DATE_MONTH (g_date_month_get_type())
86
-
87
- /* enumerations from "/usr/include/glib-2.0/glib/gunicode.h" */
88
- GType g_unicode_type_get_type (void);
89
- #define G_TYPE_UNICODE_TYPE (g_unicode_type_get_type())
90
- GType g_unicode_break_type_get_type (void);
91
- #define G_TYPE_UNICODE_BREAK_TYPE (g_unicode_break_type_get_type())
92
- GType g_unicode_script_get_type (void);
93
- #define G_TYPE_UNICODE_SCRIPT (g_unicode_script_get_type())
94
- GType g_normalize_mode_get_type (void);
95
- #define G_TYPE_NORMALIZE_MODE (g_normalize_mode_get_type())
96
-
97
- /* enumerations from "/usr/include/glib-2.0/glib/ghook.h" */
98
- GType g_hook_flag_mask_get_type (void);
99
- #define G_TYPE_HOOK_FLAG_MASK (g_hook_flag_mask_get_type())
100
-
101
- /* enumerations from "/usr/include/glib-2.0/glib/gthread.h" */
102
- GType g_thread_error_get_type (void);
103
- #define G_TYPE_THREAD_ERROR (g_thread_error_get_type())
104
- GType g_once_status_get_type (void);
105
- #define G_TYPE_ONCE_STATUS (g_once_status_get_type())
106
-
107
- /* enumerations from "/usr/include/glib-2.0/glib/gstrfuncs.h" */
108
- GType g_ascii_type_get_type (void);
109
- #define G_TYPE_ASCII_TYPE (g_ascii_type_get_type())
110
-
111
- /* enumerations from "/usr/include/glib-2.0/glib/gmessages.h" */
112
- GType g_log_level_flags_get_type (void);
113
- #define G_TYPE_LOG_LEVEL_FLAGS (g_log_level_flags_get_type())
114
-
115
- /* enumerations from "/usr/include/glib-2.0/glib/gchecksum.h" */
116
- GType g_checksum_type_get_type (void);
117
- #define G_TYPE_CHECKSUM_TYPE (g_checksum_type_get_type())
118
-
119
- /* enumerations from "/usr/include/glib-2.0/glib/gutils.h" */
120
- GType g_user_directory_get_type (void);
121
- #define G_TYPE_USER_DIRECTORY (g_user_directory_get_type())
122
- GType g_format_size_flags_get_type (void);
123
- #define G_TYPE_FORMAT_SIZE_FLAGS (g_format_size_flags_get_type())
124
-
125
- /* enumerations from "/usr/include/glib-2.0/glib/goption.h" */
126
- GType g_option_flags_get_type (void);
127
- #define G_TYPE_OPTION_FLAGS (g_option_flags_get_type())
128
- GType g_option_arg_get_type (void);
129
- #define G_TYPE_OPTION_ARG (g_option_arg_get_type())
130
- GType g_option_error_get_type (void);
131
- #define G_TYPE_OPTION_ERROR (g_option_error_get_type())
132
-
133
- /* enumerations from "/usr/include/glib-2.0/glib/gconvert.h" */
134
- GType g_convert_error_get_type (void);
135
- #define G_TYPE_CONVERT_ERROR (g_convert_error_get_type())
136
-
137
- /* enumerations from "/usr/include/glib-2.0/glib/gbookmarkfile.h" */
138
- GType g_bookmark_file_error_get_type (void);
139
- #define G_TYPE_BOOKMARK_FILE_ERROR (g_bookmark_file_error_get_type())
140
-
141
- /* enumerations from "/usr/include/glib-2.0/gobject/gsignal.h" */
142
- GType g_signal_flags_get_type (void);
143
- #define G_TYPE_SIGNAL_FLAGS (g_signal_flags_get_type())
144
- GType g_connect_flags_get_type (void);
145
- #define G_TYPE_CONNECT_FLAGS (g_connect_flags_get_type())
146
- GType g_signal_match_type_get_type (void);
147
- #define G_TYPE_SIGNAL_MATCH_TYPE (g_signal_match_type_get_type())
148
-
149
- G_END_DECLS
150
-
151
- #endif /* __GLIB_ENUM_TYPES_H__ */
152
-
153
- /* Generated data ends here */
154
-
@@ -1,100 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011-2019 Ruby-GNOME Project Team
4
- * Copyright (C) 2006 Sjoerd Simons
5
- *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License, or (at your option) any later version.
10
- *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
- * MA 02110-1301 USA
20
- */
21
-
22
- #include "rbgprivate.h"
23
-
24
- static VALUE
25
- value_array_to_ruby(const GValue *from)
26
- {
27
- VALUE ary;
28
- guint i;
29
-
30
- GValueArray *array = (GValueArray *)g_value_get_boxed(from);
31
- if (array == NULL)
32
- return Qnil;
33
-
34
- ary = rb_ary_new();
35
- for (i = 0; i < array->n_values; i++)
36
- rb_ary_push(ary, GVAL2RVAL(g_value_array_get_nth(array, i)));
37
-
38
- return ary;
39
- }
40
-
41
- struct value_array_from_ruby_args {
42
- VALUE ary;
43
- long n;
44
- GValueArray *result;
45
- };
46
-
47
- static VALUE
48
- value_array_from_ruby_body(VALUE value)
49
- {
50
- long i;
51
- struct value_array_from_ruby_args *args = (struct value_array_from_ruby_args *)value;
52
-
53
- for (i = 0; i < args->n; i++) {
54
- GValue v = G_VALUE_INIT;
55
-
56
- g_value_init(&v, RVAL2GTYPE(RARRAY_PTR(args->ary)[i]));
57
- rbgobj_rvalue_to_gvalue(RARRAY_PTR(args->ary)[i], &v);
58
-
59
- g_value_array_append(args->result, &v);
60
- }
61
-
62
- return Qnil;
63
- }
64
-
65
- static G_GNUC_NORETURN VALUE
66
- value_array_from_ruby_rescue(VALUE value, VALUE error)
67
- {
68
- g_value_array_free(((struct value_array_from_ruby_args *)value)->result);
69
-
70
- rb_exc_raise(error);
71
- }
72
-
73
- static void
74
- value_array_from_ruby(const VALUE from, GValue *to)
75
- {
76
- struct value_array_from_ruby_args args;
77
-
78
- if (NIL_P(from)) {
79
- g_value_set_boxed(to, NULL);
80
-
81
- return;
82
- }
83
-
84
- args.ary = rb_ary_to_ary(from);
85
- args.n = RARRAY_LEN(args.ary);
86
- args.result = g_value_array_new((guint)args.n);
87
-
88
- rb_rescue(value_array_from_ruby_body, (VALUE)&args,
89
- value_array_from_ruby_rescue, (VALUE)&args);
90
-
91
- g_value_set_boxed(to, args.result);
92
- }
93
-
94
- void
95
- Init_gobject_value_array(void)
96
- {
97
- /* ValueArray is treated as Array */
98
- rbgobj_register_g2r_func(G_TYPE_VALUE_ARRAY, value_array_to_ruby);
99
- rbgobj_register_r2g_func(G_TYPE_VALUE_ARRAY, value_array_from_ruby);
100
- }
@@ -1,21 +0,0 @@
1
- # Copyright (C) 2015 Ruby-GNOME2 Project Team
2
- #
3
- # This library is free software; you can redistribute it and/or
4
- # modify it under the terms of the GNU Lesser General Public
5
- # License as published by the Free Software Foundation; either
6
- # version 2.1 of the License, or (at your option) any later version.
7
- #
8
- # This library is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
- # Lesser General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU Lesser General Public
14
- # License along with this library; if not, write to the Free Software
15
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
-
17
- $VERBOSE = true
18
-
19
- require "rubygems"
20
- gem 'test-unit'
21
- require 'test/unit'