336
341
void vala_code_node_unref (gpointer instance);
337
342
GParamSpec* vala_param_spec_code_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
338
343
void vala_value_set_code_node (GValue* value, gpointer v_object);
344
void vala_value_take_code_node (GValue* value, gpointer v_object);
339
345
gpointer vala_value_get_code_node (const GValue* value);
340
346
GType vala_code_node_get_type (void);
341
347
gpointer vala_code_visitor_ref (gpointer instance);
342
348
void vala_code_visitor_unref (gpointer instance);
343
349
GParamSpec* vala_param_spec_code_visitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
344
350
void vala_value_set_code_visitor (GValue* value, gpointer v_object);
351
void vala_value_take_code_visitor (GValue* value, gpointer v_object);
345
352
gpointer vala_value_get_code_visitor (const GValue* value);
346
353
GType vala_code_visitor_get_type (void);
347
354
GType vala_semantic_analyzer_get_type (void);
364
371
void vala_source_reference_unref (gpointer instance);
365
372
GParamSpec* vala_param_spec_source_reference (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
366
373
void vala_value_set_source_reference (GValue* value, gpointer v_object);
374
void vala_value_take_source_reference (GValue* value, gpointer v_object);
367
375
gpointer vala_value_get_source_reference (const GValue* value);
368
376
GType vala_source_reference_get_type (void);
369
377
gpointer vala_comment_ref (gpointer instance);
370
378
void vala_comment_unref (gpointer instance);
371
379
GParamSpec* vala_param_spec_comment (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
372
380
void vala_value_set_comment (GValue* value, gpointer v_object);
381
void vala_value_take_comment (GValue* value, gpointer v_object);
373
382
gpointer vala_value_get_comment (const GValue* value);
374
383
GType vala_comment_get_type (void);
375
384
ValaMember* vala_member_construct (GType object_type, const char* name, ValaSourceReference* source_reference, ValaComment* comment);
376
385
void vala_signal_set_return_type (ValaSignal* self, ValaDataType* value);
386
void vala_signal_set_run_type (ValaSignal* self, const char* value);
377
387
ValaSignal* vala_signal_new (const char* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
378
388
ValaSignal* vala_signal_construct (GType object_type, const char* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
379
389
void vala_formal_parameter_set_cparameter_position (ValaFormalParameter* self, double value);
380
390
double vala_formal_parameter_get_cparameter_position (ValaFormalParameter* self);
381
391
void vala_formal_parameter_set_carray_length_parameter_position (ValaFormalParameter* self, double value);
382
392
void vala_formal_parameter_set_cdelegate_target_parameter_position (ValaFormalParameter* self, double value);
393
void vala_formal_parameter_set_cdestroy_notify_parameter_position (ValaFormalParameter* self, double value);
383
394
gpointer vala_scope_ref (gpointer instance);
384
395
void vala_scope_unref (gpointer instance);
385
396
GParamSpec* vala_param_spec_scope (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
386
397
void vala_value_set_scope (GValue* value, gpointer v_object);
398
void vala_value_take_scope (GValue* value, gpointer v_object);
387
399
gpointer vala_value_get_scope (const GValue* value);
388
400
GType vala_scope_get_type (void);
389
401
ValaScope* vala_symbol_get_scope (ValaSymbol* self);
421
433
void vala_code_node_accept (ValaCodeNode* self, ValaCodeVisitor* visitor);
422
434
ValaMethod* vala_signal_get_default_handler (ValaSignal* self);
423
435
static void vala_signal_real_accept_children (ValaCodeNode* base, ValaCodeVisitor* visitor);
436
gboolean vala_attribute_has_argument (ValaAttribute* self, const char* name);
437
gboolean vala_attribute_get_bool (ValaAttribute* self, const char* name);
438
void vala_signal_set_is_detailed (ValaSignal* self, gboolean value);
439
void vala_signal_set_no_recurse (ValaSignal* self, gboolean value);
440
char* vala_attribute_get_string (ValaAttribute* self, const char* name);
441
void vala_signal_set_is_action (ValaSignal* self, gboolean value);
442
void vala_signal_set_no_hooks (ValaSignal* self, gboolean value);
443
static void vala_signal_process_signal_attribute (ValaSignal* self, ValaAttribute* a);
424
444
const char* vala_attribute_get_name (ValaAttribute* self);
425
445
void vala_signal_set_has_emitter (ValaSignal* self, gboolean value);
426
446
void vala_signal_process_attributes (ValaSignal* self);
460
480
void vala_signal_set_body (ValaSignal* self, ValaBlock* value);
461
481
gboolean vala_signal_get_has_emitter (ValaSignal* self);
462
482
void vala_signal_set_is_virtual (ValaSignal* self, gboolean value);
483
gboolean vala_signal_get_is_detailed (ValaSignal* self);
484
gboolean vala_signal_get_no_recurse (ValaSignal* self);
485
const char* vala_signal_get_run_type (ValaSignal* self);
486
gboolean vala_signal_get_is_action (ValaSignal* self);
487
gboolean vala_signal_get_no_hooks (ValaSignal* self);
463
488
static void vala_signal_finalize (ValaCodeNode* obj);
464
489
static int _vala_strcmp0 (const char * str1, const char * str2);
471
496
g_return_val_if_fail (return_type != NULL, NULL);
472
497
self = (ValaSignal*) vala_member_construct (object_type, name, source_reference, comment);
473
498
vala_signal_set_return_type (self, return_type);
499
vala_signal_set_run_type (self, "last");
486
512
vala_formal_parameter_set_cparameter_position (param, (double) (vala_collection_get_size ((ValaCollection*) self->priv->parameters) + 1));
487
513
vala_formal_parameter_set_carray_length_parameter_position (param, vala_formal_parameter_get_cparameter_position (param) + 0.1);
488
514
vala_formal_parameter_set_cdelegate_target_parameter_position (param, vala_formal_parameter_get_cparameter_position (param) + 0.1);
515
vala_formal_parameter_set_cdestroy_notify_parameter_position (param, vala_formal_parameter_get_cparameter_position (param) + 0.1);
489
516
vala_collection_add ((ValaCollection*) self->priv->parameters, param);
490
517
vala_scope_add (vala_symbol_get_scope ((ValaSymbol*) self), vala_symbol_get_name ((ValaSymbol*) param), (ValaSymbol*) param);
521
static gpointer _vala_collection_object_ref0 (gpointer self) {
522
return self ? vala_collection_object_ref (self) : NULL;
494
526
ValaList* vala_signal_get_parameters (ValaSignal* self) {
527
ValaList* result = NULL;
496
528
g_return_val_if_fail (self != NULL, NULL);
497
result = (ValaList*) vala_read_only_list_new (VALA_TYPE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, self->priv->parameters);
529
result = _vala_collection_object_ref0 (self->priv->parameters);
502
534
ValaDelegate* vala_signal_get_delegate (ValaSignal* self, ValaDataType* sender_type, ValaCodeNode* node_reference) {
503
ValaDelegate* result;
535
ValaDelegate* result = NULL;
504
536
ValaDataType* actual_return_type;
505
537
ValaDelegate* generated_delegate;
506
538
ValaDataType* sender_param_type;
666
static void vala_signal_process_signal_attribute (ValaSignal* self, ValaAttribute* a) {
667
g_return_if_fail (self != NULL);
668
g_return_if_fail (a != NULL);
669
if (vala_attribute_has_argument (a, "detailed")) {
670
vala_signal_set_is_detailed (self, vala_attribute_get_bool (a, "detailed"));
672
if (vala_attribute_has_argument (a, "no_recurse")) {
673
vala_signal_set_no_recurse (self, vala_attribute_get_bool (a, "no_recurse"));
675
if (vala_attribute_has_argument (a, "run")) {
677
arg = vala_attribute_get_string (a, "run");
678
if (_vala_strcmp0 (arg, "first") == 0) {
679
vala_signal_set_run_type (self, "first");
681
if (_vala_strcmp0 (arg, "last") == 0) {
682
vala_signal_set_run_type (self, "last");
684
if (_vala_strcmp0 (arg, "cleanup") == 0) {
685
vala_signal_set_run_type (self, "cleanup");
691
if (vala_attribute_has_argument (a, "action")) {
692
vala_signal_set_is_action (self, vala_attribute_get_bool (a, "action"));
694
if (vala_attribute_has_argument (a, "no_hooks")) {
695
vala_signal_set_no_hooks (self, vala_attribute_get_bool (a, "no_hooks"));
634
700
static gpointer _vala_code_node_ref0 (gpointer self) {
635
701
return self ? vala_code_node_ref (self) : NULL;
649
715
if (_vala_strcmp0 (vala_attribute_get_name (a), "HasEmitter") == 0) {
650
716
vala_signal_set_has_emitter (self, TRUE);
718
if (_vala_strcmp0 (vala_attribute_get_name (a), "Signal") == 0) {
719
vala_signal_process_signal_attribute (self, a);
652
721
_vala_code_node_unref0 (a);
770
839
ValaSymbol* _tmp7_;
772
vala_report_warning (vala_code_node_get_source_reference ((ValaCodeNode*) self), _tmp9_ = g_strdup_printf ("%s hides inherited signal `%s'. Use the `new' keyword if hiding was intentional", _tmp6_ = vala_symbol_get_full_name ((ValaSymbol*) self), _tmp8_ = vala_symbol_get_full_name (_tmp7_ = vala_member_get_hidden_member ((ValaMember*) self))));
841
vala_report_warning (vala_code_node_get_source_reference ((ValaCodeNode*) self), _tmp9_ = g_strdup_printf ("%s hides inherited signal `%s'. Use the `new' keyword if hiding was in" \
842
"tentional", _tmp6_ = vala_symbol_get_full_name ((ValaSymbol*) self), _tmp8_ = vala_symbol_get_full_name (_tmp7_ = vala_member_get_hidden_member ((ValaMember*) self))));
773
843
_g_free0 (_tmp9_);
774
844
_g_free0 (_tmp8_);
775
845
_vala_code_node_unref0 (_tmp7_);
930
gboolean vala_signal_get_is_detailed (ValaSignal* self) {
932
g_return_val_if_fail (self != NULL, FALSE);
933
result = self->priv->_is_detailed;
938
void vala_signal_set_is_detailed (ValaSignal* self, gboolean value) {
939
g_return_if_fail (self != NULL);
940
self->priv->_is_detailed = value;
944
gboolean vala_signal_get_no_recurse (ValaSignal* self) {
946
g_return_val_if_fail (self != NULL, FALSE);
947
result = self->priv->_no_recurse;
952
void vala_signal_set_no_recurse (ValaSignal* self, gboolean value) {
953
g_return_if_fail (self != NULL);
954
self->priv->_no_recurse = value;
958
const char* vala_signal_get_run_type (ValaSignal* self) {
960
g_return_val_if_fail (self != NULL, NULL);
961
result = self->priv->_run_type;
966
void vala_signal_set_run_type (ValaSignal* self, const char* value) {
968
g_return_if_fail (self != NULL);
969
self->priv->_run_type = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_run_type), _tmp0_);
973
gboolean vala_signal_get_is_action (ValaSignal* self) {
975
g_return_val_if_fail (self != NULL, FALSE);
976
result = self->priv->_is_action;
981
void vala_signal_set_is_action (ValaSignal* self, gboolean value) {
982
g_return_if_fail (self != NULL);
983
self->priv->_is_action = value;
987
gboolean vala_signal_get_no_hooks (ValaSignal* self) {
989
g_return_val_if_fail (self != NULL, FALSE);
990
result = self->priv->_no_hooks;
995
void vala_signal_set_no_hooks (ValaSignal* self, gboolean value) {
996
g_return_if_fail (self != NULL);
997
self->priv->_no_hooks = value;
860
1001
static void vala_signal_class_init (ValaSignalClass * klass) {
861
1002
vala_signal_parent_class = g_type_class_peek_parent (klass);
862
1003
VALA_CODE_NODE_CLASS (klass)->finalize = vala_signal_finalize;
887
1028
self = VALA_SIGNAL (obj);
888
1029
_vala_collection_object_unref0 (self->priv->parameters);
889
1030
_vala_code_node_unref0 (self->priv->_default_handler);
1031
_g_free0 (self->priv->_run_type);
890
1032
_g_free0 (self->priv->cname);
891
1033
_vala_code_node_unref0 (self->priv->_return_type);
892
1034
_vala_code_node_unref0 (self->priv->_body);
897
1039
GType vala_signal_get_type (void) {
898
static GType vala_signal_type_id = 0;
899
if (vala_signal_type_id == 0) {
1040
static volatile gsize vala_signal_type_id__volatile = 0;
1041
if (g_once_init_enter (&vala_signal_type_id__volatile)) {
900
1042
static const GTypeInfo g_define_type_info = { sizeof (ValaSignalClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_signal_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaSignal), 0, (GInstanceInitFunc) vala_signal_instance_init, NULL };
901
1043
static const GInterfaceInfo vala_lockable_info = { (GInterfaceInitFunc) vala_signal_vala_lockable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
1044
GType vala_signal_type_id;
902
1045
vala_signal_type_id = g_type_register_static (VALA_TYPE_MEMBER, "ValaSignal", &g_define_type_info, 0);
903
1046
g_type_add_interface_static (vala_signal_type_id, VALA_TYPE_LOCKABLE, &vala_lockable_info);
1047
g_once_init_leave (&vala_signal_type_id__volatile, vala_signal_type_id);
905
return vala_signal_type_id;
1049
return vala_signal_type_id__volatile;