glib2 3.3.8 → 3.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/glib2/extconf.rb +22 -6
- data/ext/glib2/glib2.def +7 -2
- data/ext/glib2/rbglib-bytes.c +9 -1
- data/ext/glib2/rbglib-gc.c +1 -3
- data/ext/glib2/rbglib.c +83 -26
- data/ext/glib2/rbglib.h +14 -14
- data/ext/glib2/rbglib2conversions.h +2 -2
- data/ext/glib2/rbglib_iochannel.c +15 -12
- data/ext/glib2/rbglib_maincontext.c +5 -5
- data/ext/glib2/rbglib_messages.c +6 -2
- data/ext/glib2/rbglib_pollfd.c +7 -7
- data/ext/glib2/rbglib_source.c +2 -2
- data/ext/glib2/rbgobj_boxed.c +1 -3
- data/ext/glib2/rbgobj_enums.c +0 -2
- data/ext/glib2/rbgobj_flags.c +4 -5
- data/ext/glib2/rbgobj_object.c +19 -7
- data/ext/glib2/rbgobj_param.c +66 -24
- data/ext/glib2/rbgobj_signal.c +10 -9
- data/ext/glib2/rbgobj_type.c +24 -0
- data/ext/glib2/rbgobj_value.c +10 -4
- data/ext/glib2/rbgobj_valuearray.c +3 -3
- data/ext/glib2/rbgobject.h +8 -4
- data/ext/glib2/rbgprivate.h +1 -2
- data/ext/glib2/rbgutil_callback.c +4 -4
- data/lib/glib-mkenums.rb +2 -0
- data/lib/glib2/deprecated.rb +7 -1
- data/lib/mkmf-gnome.rb +478 -0
- data/lib/mkmf-gnome2.rb +14 -466
- metadata +5 -3
@@ -269,7 +269,7 @@ mc_query_body(VALUE value)
|
|
269
269
|
VALUE ary = rb_ary_new();
|
270
270
|
|
271
271
|
for (i = 0; i < args->n_fds; i++)
|
272
|
-
rb_ary_push(ary,
|
272
|
+
rb_ary_push(ary, GPOLLFD2RVAL(&args->fds[i]));
|
273
273
|
|
274
274
|
return rb_assoc_new(INT2NUM(args->timeout_), ary);
|
275
275
|
}
|
@@ -332,7 +332,7 @@ rg_check(VALUE self, VALUE max_priority)
|
|
332
332
|
printf("ret = %d\n", ret);
|
333
333
|
ary = rb_ary_new();
|
334
334
|
for (i = 0; i < ret; i++)
|
335
|
-
rb_ary_push(ary,
|
335
|
+
rb_ary_push(ary, GPOLLFD2RVAL(&fds[i]));
|
336
336
|
|
337
337
|
g_free(fds);
|
338
338
|
return ary;
|
@@ -353,7 +353,7 @@ poll_func(GPollFD *ufds, guint nfsd, gint timeout_)
|
|
353
353
|
VALUE func = rb_ivar_get(self, id_poll_func);
|
354
354
|
if (NIL_P(func)) return -1;
|
355
355
|
|
356
|
-
return INT2NUM(rb_funcall(func, 3,
|
356
|
+
return INT2NUM(rb_funcall(func, 3, GPOLLFD2RVAL(ufds),
|
357
357
|
UINT2NUM(nfsd), INT2NUM(timeout_)));
|
358
358
|
}
|
359
359
|
|
@@ -374,7 +374,7 @@ GPollFunc g_main_context_get_poll_func (GMainContext *context);
|
|
374
374
|
static VALUE
|
375
375
|
rg_add_poll(VALUE self, VALUE fd, VALUE priority)
|
376
376
|
{
|
377
|
-
g_main_context_add_poll(_SELF(self),
|
377
|
+
g_main_context_add_poll(_SELF(self), RVAL2GPOLLFD(fd),
|
378
378
|
NUM2INT(priority));
|
379
379
|
return self;
|
380
380
|
}
|
@@ -382,7 +382,7 @@ rg_add_poll(VALUE self, VALUE fd, VALUE priority)
|
|
382
382
|
static VALUE
|
383
383
|
rg_remove_poll(VALUE self, VALUE fd)
|
384
384
|
{
|
385
|
-
g_main_context_remove_poll(_SELF(self),
|
385
|
+
g_main_context_remove_poll(_SELF(self), RVAL2GPOLLFD(fd));
|
386
386
|
return self;
|
387
387
|
}
|
388
388
|
|
data/ext/glib2/rbglib_messages.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011 Ruby-
|
3
|
+
* Copyright (C) 2011-2019 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2002-2005 Masao Mutoh
|
5
5
|
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
6
6
|
* Daisuke Kanda,
|
@@ -49,7 +49,11 @@ logmessage(GLogLevelFlags level)
|
|
49
49
|
}
|
50
50
|
|
51
51
|
static VALUE
|
52
|
-
rbg_printerr(VALUE message,
|
52
|
+
rbg_printerr(VALUE message,
|
53
|
+
G_GNUC_UNUSED VALUE user_data,
|
54
|
+
G_GNUC_UNUSED int argc,
|
55
|
+
G_GNUC_UNUSED const VALUE *argv,
|
56
|
+
G_GNUC_UNUSED VALUE block)
|
53
57
|
{
|
54
58
|
g_printerr("\tfrom %.*s\n",
|
55
59
|
(int)RSTRING_LEN(message),
|
data/ext/glib2/rbglib_pollfd.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011-2019 Ruby-
|
3
|
+
* Copyright (C) 2011-2019 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2005 Masao Mutoh
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
#include "rbgprivate.h"
|
23
23
|
|
24
|
-
|
24
|
+
#if !GLIB_CHECK_VERSION(2, 36, 0)
|
25
25
|
static GPollFD*
|
26
26
|
pollfd_copy(const GPollFD* pollfd)
|
27
27
|
{
|
@@ -34,7 +34,7 @@ pollfd_copy(const GPollFD* pollfd)
|
|
34
34
|
}
|
35
35
|
|
36
36
|
GType
|
37
|
-
|
37
|
+
g_pollfd_get_type(void)
|
38
38
|
{
|
39
39
|
static GType our_type = 0;
|
40
40
|
if (our_type == 0)
|
@@ -43,10 +43,10 @@ g_poll_fd_get_type(void)
|
|
43
43
|
(GBoxedFreeFunc)g_free);
|
44
44
|
return our_type;
|
45
45
|
}
|
46
|
-
|
46
|
+
#endif
|
47
47
|
|
48
48
|
#define RG_TARGET_NAMESPACE cPollFD
|
49
|
-
#define _SELF(s) ((GPollFD*)RVAL2BOXED(s,
|
49
|
+
#define _SELF(s) ((GPollFD*)RVAL2BOXED(s, G_TYPE_POLLFD))
|
50
50
|
|
51
51
|
static VALUE
|
52
52
|
rg_initialize(VALUE self, VALUE fd, VALUE events, VALUE revents)
|
@@ -56,7 +56,7 @@ rg_initialize(VALUE self, VALUE fd, VALUE events, VALUE revents)
|
|
56
56
|
gfd.events = NUM2INT(events);
|
57
57
|
gfd.revents = NUM2INT(revents);
|
58
58
|
|
59
|
-
G_INITIALIZE(self, g_boxed_copy(
|
59
|
+
G_INITIALIZE(self, g_boxed_copy(G_TYPE_POLLFD, &gfd));
|
60
60
|
return Qnil;
|
61
61
|
}
|
62
62
|
|
@@ -99,7 +99,7 @@ rg_revents(VALUE self)
|
|
99
99
|
void
|
100
100
|
Init_glib_poll_fd(void)
|
101
101
|
{
|
102
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(
|
102
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_POLLFD, "PollFD", mGLib);
|
103
103
|
|
104
104
|
RG_DEF_METHOD(initialize, 3);
|
105
105
|
|
data/ext/glib2/rbglib_source.c
CHANGED
@@ -178,14 +178,14 @@ rg_set_ready_time(VALUE self, VALUE ready_time)
|
|
178
178
|
static VALUE
|
179
179
|
rg_add_poll(VALUE self, VALUE fd)
|
180
180
|
{
|
181
|
-
g_source_add_poll(_SELF(self),
|
181
|
+
g_source_add_poll(_SELF(self), RVAL2GPOLLFD(fd));
|
182
182
|
return self;
|
183
183
|
}
|
184
184
|
|
185
185
|
static VALUE
|
186
186
|
rg_remove_poll(VALUE self, VALUE fd)
|
187
187
|
{
|
188
|
-
g_source_remove_poll(_SELF(self),
|
188
|
+
g_source_remove_poll(_SELF(self), RVAL2GPOLLFD(fd));
|
189
189
|
return self;
|
190
190
|
}
|
191
191
|
|
data/ext/glib2/rbgobj_boxed.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011-2019 Ruby-
|
3
|
+
* Copyright (C) 2011-2019 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -57,8 +57,6 @@ static const rb_data_type_t rg_glib_boxed_type = {
|
|
57
57
|
{
|
58
58
|
boxed_mark,
|
59
59
|
boxed_free,
|
60
|
-
NULL,
|
61
|
-
{0},
|
62
60
|
},
|
63
61
|
NULL,
|
64
62
|
NULL,
|
data/ext/glib2/rbgobj_enums.c
CHANGED
data/ext/glib2/rbgobj_flags.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2004-2019 Ruby-
|
3
|
+
* Copyright (C) 2004-2019 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -80,8 +80,6 @@ static const rb_data_type_t rg_glib_flags_type = {
|
|
80
80
|
{
|
81
81
|
NULL,
|
82
82
|
flags_free,
|
83
|
-
NULL,
|
84
|
-
{0},
|
85
83
|
},
|
86
84
|
NULL,
|
87
85
|
NULL,
|
@@ -371,7 +369,8 @@ flags_compare_get_flags_body(VALUE user_data)
|
|
371
369
|
}
|
372
370
|
|
373
371
|
static VALUE
|
374
|
-
flags_compare_get_flags_rescue(VALUE user_data
|
372
|
+
flags_compare_get_flags_rescue(VALUE user_data,
|
373
|
+
G_GNUC_UNUSED VALUE error)
|
375
374
|
{
|
376
375
|
compare_data *data = (compare_data *)user_data;
|
377
376
|
|
@@ -467,7 +466,7 @@ rg_operator_flags_lt(VALUE self, VALUE rhs)
|
|
467
466
|
}
|
468
467
|
|
469
468
|
static VALUE
|
470
|
-
rg_operator_flags_not(VALUE self
|
469
|
+
rg_operator_flags_not(VALUE self)
|
471
470
|
{
|
472
471
|
flags_holder* p = flags_get_holder(self);
|
473
472
|
return rbgobj_make_flags((~ p->value) & p->gclass->mask,
|
data/ext/glib2/rbgobj_object.c
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011-2019 Ruby-
|
4
|
-
* Copyright (C) 2002-2004 Ruby-
|
3
|
+
* Copyright (C) 2011-2019 Ruby-GNOME Project Team
|
4
|
+
* Copyright (C) 2002-2004 Ruby-GNOME Project Team
|
5
5
|
* Copyright (C) 2002-2003 Masahiro Sakai
|
6
6
|
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
7
7
|
* Daisuke Kanda,
|
@@ -31,6 +31,12 @@ VALUE RG_TARGET_NAMESPACE;
|
|
31
31
|
static VALUE eNoPropertyError;
|
32
32
|
static GQuark RUBY_GOBJECT_OBJ_KEY;
|
33
33
|
|
34
|
+
gboolean
|
35
|
+
rbg_is_object(VALUE object)
|
36
|
+
{
|
37
|
+
return RVAL2CBOOL(rb_obj_is_kind_of(object, RG_TARGET_NAMESPACE));
|
38
|
+
}
|
39
|
+
|
34
40
|
/* deperecated */
|
35
41
|
void
|
36
42
|
rbgobj_add_abstract_but_create_instance_class(G_GNUC_UNUSED GType gtype)
|
@@ -100,8 +106,6 @@ static const rb_data_type_t rg_glib_object_type = {
|
|
100
106
|
{
|
101
107
|
holder_mark,
|
102
108
|
holder_free,
|
103
|
-
NULL,
|
104
|
-
{0},
|
105
109
|
},
|
106
110
|
NULL,
|
107
111
|
NULL,
|
@@ -317,8 +321,14 @@ struct param_setup_arg {
|
|
317
321
|
};
|
318
322
|
|
319
323
|
static VALUE
|
320
|
-
_params_setup(VALUE arg,
|
324
|
+
_params_setup(VALUE arg,
|
325
|
+
VALUE rb_param_setup_arg,
|
326
|
+
G_GNUC_UNUSED int argc,
|
327
|
+
G_GNUC_UNUSED const VALUE *argv,
|
328
|
+
G_GNUC_UNUSED VALUE block)
|
321
329
|
{
|
330
|
+
struct param_setup_arg *param_setup_arg =
|
331
|
+
(struct param_setup_arg *)rb_param_setup_arg;
|
322
332
|
guint index;
|
323
333
|
VALUE name, val;
|
324
334
|
GParamSpec* pspec;
|
@@ -352,16 +362,18 @@ _params_setup(VALUE arg, struct param_setup_arg *param_setup_arg)
|
|
352
362
|
}
|
353
363
|
|
354
364
|
static VALUE
|
355
|
-
gobj_new_body(
|
365
|
+
gobj_new_body(VALUE rb_arg)
|
356
366
|
{
|
367
|
+
struct param_setup_arg *arg = (struct param_setup_arg *)rb_arg;
|
357
368
|
rb_iterate(rb_each, (VALUE)arg->params_hash, _params_setup, (VALUE)arg);
|
358
369
|
return (VALUE)g_object_newv(G_TYPE_FROM_CLASS(arg->gclass),
|
359
370
|
arg->param_size, arg->params);
|
360
371
|
}
|
361
372
|
|
362
373
|
static VALUE
|
363
|
-
gobj_new_ensure(
|
374
|
+
gobj_new_ensure(VALUE rb_arg)
|
364
375
|
{
|
376
|
+
struct param_setup_arg *arg = (struct param_setup_arg *)rb_arg;
|
365
377
|
guint i;
|
366
378
|
g_type_class_unref(arg->gclass);
|
367
379
|
for (i = 0; i < arg->param_size; i++) {
|
data/ext/glib2/rbgobj_param.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011-2019 Ruby-
|
3
|
+
* Copyright (C) 2011-2019 Ruby-GNOME Project Team
|
4
4
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -58,8 +58,6 @@ static const rb_data_type_t rg_glib_param_type = {
|
|
58
58
|
{
|
59
59
|
pspec_mark,
|
60
60
|
pspec_free,
|
61
|
-
NULL,
|
62
|
-
{0},
|
63
61
|
},
|
64
62
|
NULL,
|
65
63
|
NULL,
|
@@ -228,8 +226,9 @@ struct validate_arg{
|
|
228
226
|
};
|
229
227
|
|
230
228
|
static VALUE
|
231
|
-
value_validate_body(
|
229
|
+
value_validate_body(VALUE rb_arg)
|
232
230
|
{
|
231
|
+
struct validate_arg *arg = (struct validate_arg *)rb_arg;
|
233
232
|
VALUE ret;
|
234
233
|
gboolean b;
|
235
234
|
|
@@ -240,8 +239,9 @@ value_validate_body(struct validate_arg* arg)
|
|
240
239
|
}
|
241
240
|
|
242
241
|
static VALUE
|
243
|
-
value_validate_ensure(
|
242
|
+
value_validate_ensure(VALUE rb_arg)
|
244
243
|
{
|
244
|
+
struct validate_arg *arg = (struct validate_arg *)rb_arg;
|
245
245
|
g_value_unset(arg->value);
|
246
246
|
return Qnil;
|
247
247
|
}
|
@@ -332,16 +332,22 @@ rg_ref_count(VALUE self)
|
|
332
332
|
param_is_##flag(VALUE self) \
|
333
333
|
{ \
|
334
334
|
GParamSpec* pspec = G_PARAM_SPEC(rbgobj_get_param_spec(self)); \
|
335
|
-
return CBOOL2RVAL(pspec->flags & flag); \
|
335
|
+
return CBOOL2RVAL((pspec->flags & flag) == flag); \
|
336
336
|
}
|
337
337
|
|
338
338
|
param_is_flag(G_PARAM_READABLE)
|
339
339
|
param_is_flag(G_PARAM_WRITABLE)
|
340
|
+
param_is_flag(G_PARAM_READWRITE)
|
340
341
|
param_is_flag(G_PARAM_CONSTRUCT)
|
341
342
|
param_is_flag(G_PARAM_CONSTRUCT_ONLY)
|
342
343
|
param_is_flag(G_PARAM_LAX_VALIDATION)
|
343
|
-
param_is_flag(
|
344
|
-
param_is_flag(
|
344
|
+
param_is_flag(G_PARAM_STATIC_NAME)
|
345
|
+
param_is_flag(G_PARAM_STATIC_NICK)
|
346
|
+
param_is_flag(G_PARAM_STATIC_BLURB)
|
347
|
+
#if GLIB_CHECK_VERSION(2, 42, 0)
|
348
|
+
param_is_flag(G_PARAM_EXPLICIT_NOTIFY)
|
349
|
+
#endif
|
350
|
+
param_is_flag(G_PARAM_DEPRECATED)
|
345
351
|
|
346
352
|
/**********************************************************************/
|
347
353
|
|
@@ -352,15 +358,34 @@ Init_gobject_gparam(void)
|
|
352
358
|
RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_PARAM, "Param", mGLib);
|
353
359
|
|
354
360
|
/* GParamFlags */
|
355
|
-
rb_define_const(RG_TARGET_NAMESPACE, "READABLE",
|
356
|
-
|
357
|
-
rb_define_const(RG_TARGET_NAMESPACE, "
|
358
|
-
|
359
|
-
rb_define_const(RG_TARGET_NAMESPACE, "
|
360
|
-
|
361
|
-
rb_define_const(RG_TARGET_NAMESPACE, "
|
362
|
-
|
363
|
-
rb_define_const(RG_TARGET_NAMESPACE, "
|
361
|
+
rb_define_const(RG_TARGET_NAMESPACE, "READABLE",
|
362
|
+
INT2FIX(G_PARAM_READABLE));
|
363
|
+
rb_define_const(RG_TARGET_NAMESPACE, "WRITABLE",
|
364
|
+
INT2FIX(G_PARAM_WRITABLE));
|
365
|
+
rb_define_const(RG_TARGET_NAMESPACE, "READWRITE",
|
366
|
+
INT2FIX(G_PARAM_READWRITE));
|
367
|
+
rb_define_const(RG_TARGET_NAMESPACE, "CONSTRUCT",
|
368
|
+
INT2FIX(G_PARAM_CONSTRUCT));
|
369
|
+
rb_define_const(RG_TARGET_NAMESPACE, "CONSTRUCT_ONLY",
|
370
|
+
INT2FIX(G_PARAM_CONSTRUCT_ONLY));
|
371
|
+
rb_define_const(RG_TARGET_NAMESPACE, "LAX_VALIDATION",
|
372
|
+
INT2FIX(G_PARAM_LAX_VALIDATION));
|
373
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STATIC_NAME",
|
374
|
+
INT2FIX(G_PARAM_STATIC_NAME));
|
375
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STATIC_NICK",
|
376
|
+
INT2FIX(G_PARAM_STATIC_NICK));
|
377
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STATIC_BLURB",
|
378
|
+
INT2FIX(G_PARAM_STATIC_BLURB));
|
379
|
+
#if GLIB_CHECK_VERSION(2, 42, 0)
|
380
|
+
rb_define_const(RG_TARGET_NAMESPACE, "EXPLICIT_NOTIFY",
|
381
|
+
INT2FIX(G_PARAM_EXPLICIT_NOTIFY));
|
382
|
+
#endif
|
383
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DEPRECATED",
|
384
|
+
INT2FIX(G_PARAM_DEPRECATED));
|
385
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MASK",
|
386
|
+
INT2FIX(G_PARAM_MASK));
|
387
|
+
rb_define_const(RG_TARGET_NAMESPACE, "USER_SHIFT",
|
388
|
+
INT2FIX(G_PARAM_USER_SHIFT));
|
364
389
|
|
365
390
|
rb_define_alloc_func(RG_TARGET_NAMESPACE, pspec_s_allocate);
|
366
391
|
|
@@ -389,11 +414,28 @@ Init_gobject_gparam(void)
|
|
389
414
|
/* for debugging */
|
390
415
|
RG_DEF_METHOD(ref_count, 0);
|
391
416
|
|
392
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "readable?",
|
393
|
-
|
394
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "
|
395
|
-
|
396
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "
|
397
|
-
|
398
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "
|
417
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "readable?",
|
418
|
+
param_is_G_PARAM_READABLE, 0);
|
419
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "writable?",
|
420
|
+
param_is_G_PARAM_WRITABLE, 0);
|
421
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "readwrite?",
|
422
|
+
param_is_G_PARAM_READWRITE, 0);
|
423
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "construct?",
|
424
|
+
param_is_G_PARAM_CONSTRUCT, 0);
|
425
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "construct_only?",
|
426
|
+
param_is_G_PARAM_CONSTRUCT_ONLY, 0);
|
427
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "lax_validation?",
|
428
|
+
param_is_G_PARAM_LAX_VALIDATION, 0);
|
429
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "static_name?",
|
430
|
+
param_is_G_PARAM_STATIC_NAME, 0);
|
431
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "static_nick?",
|
432
|
+
param_is_G_PARAM_STATIC_NICK, 0);
|
433
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "static_blurb?",
|
434
|
+
param_is_G_PARAM_STATIC_BLURB, 0);
|
435
|
+
#if GLIB_CHECK_VERSION(2, 42, 0)
|
436
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "explicit_notify?",
|
437
|
+
param_is_G_PARAM_EXPLICIT_NOTIFY, 0);
|
438
|
+
#endif
|
439
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "deprecated?",
|
440
|
+
param_is_G_PARAM_DEPRECATED, 0);
|
399
441
|
}
|
data/ext/glib2/rbgobj_signal.c
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011-2019 Ruby-
|
4
|
-
* Copyright (C) 2002-2004 Ruby-
|
3
|
+
* Copyright (C) 2011-2019 Ruby-GNOME Project Team
|
4
|
+
* Copyright (C) 2002-2004 Ruby-GNOME Project Team
|
5
5
|
* Copyright (C) 2002,2003 Masahiro Sakai
|
6
6
|
*
|
7
7
|
* This library is free software; you can redistribute it and/or
|
@@ -36,8 +36,6 @@ static const rb_data_type_t rg_glib_signal_type = {
|
|
36
36
|
{
|
37
37
|
NULL,
|
38
38
|
NULL,
|
39
|
-
NULL,
|
40
|
-
{0},
|
41
39
|
},
|
42
40
|
NULL,
|
43
41
|
NULL,
|
@@ -158,11 +156,11 @@ rbg_rval2gtypes_body(VALUE value)
|
|
158
156
|
}
|
159
157
|
|
160
158
|
static G_GNUC_NORETURN VALUE
|
161
|
-
rbg_rval2gtypes_rescue(VALUE value)
|
159
|
+
rbg_rval2gtypes_rescue(VALUE value, VALUE error)
|
162
160
|
{
|
163
161
|
g_free(((struct rval2gtypes_args *)value)->result);
|
164
162
|
|
165
|
-
rb_exc_raise(
|
163
|
+
rb_exc_raise(error);
|
166
164
|
}
|
167
165
|
|
168
166
|
static GType *
|
@@ -446,8 +444,9 @@ struct emit_arg {
|
|
446
444
|
};
|
447
445
|
|
448
446
|
static VALUE
|
449
|
-
emit_body(
|
447
|
+
emit_body(VALUE rb_arg)
|
450
448
|
{
|
449
|
+
struct emit_arg *arg = (struct emit_arg *)rb_arg;
|
451
450
|
GValue param = G_VALUE_INIT;
|
452
451
|
|
453
452
|
g_value_init(¶m, G_TYPE_FROM_INSTANCE(RVAL2GOBJ(arg->self)));
|
@@ -491,8 +490,9 @@ emit_body(struct emit_arg* arg)
|
|
491
490
|
}
|
492
491
|
|
493
492
|
static VALUE
|
494
|
-
emit_ensure(
|
493
|
+
emit_ensure(VALUE rb_arg)
|
495
494
|
{
|
495
|
+
struct emit_arg *arg = (struct emit_arg *)rb_arg;
|
496
496
|
g_value_array_free(arg->instance_and_params);
|
497
497
|
return Qnil;
|
498
498
|
}
|
@@ -625,8 +625,9 @@ guint g_signal_handlers_disconnect_matched (gpointer instance,
|
|
625
625
|
#endif
|
626
626
|
|
627
627
|
static VALUE
|
628
|
-
chain_from_overridden_body(
|
628
|
+
chain_from_overridden_body(VALUE rb_arg)
|
629
629
|
{
|
630
|
+
struct emit_arg *arg = (struct emit_arg *)rb_arg;
|
630
631
|
g_value_init(arg->instance_and_params->values,
|
631
632
|
G_TYPE_FROM_INSTANCE(RVAL2GOBJ(arg->self)));
|
632
633
|
rbgobj_rvalue_to_gvalue(arg->self, arg->instance_and_params->values);
|