建立一个 ATK 信号处理函数

使用 column_inserted 信号来举例:

table_column_inserted_id = g_signal_connect_closure_by_id (my_atk_obj, 
g_signal_lookup("column_inserted", G_OBJECT_TYPE(my_atk_obj)), 0, 
g_cclosure_new(G_CALLBACK (_my_table_column_inserted_func), NULL, NULL), FALSE);

这会使无论何时 AtkObject my_atk_object 发出一个 column_inserted 信号,都会调用 _my_table_column_inserted_func()

Connecting to a signal is slightly different if the signal supports detail. The children_changed signal supports the add detail. To connect to a signal when the add detail is also specified, this technique is used:

child_added_id = g_signal_connect_closure (my_atk_obj,"children_changed::add",
g_cclosure_new (G_CALLBACK(_my_children_changed_func), NULL, NULL), FALSE);

This will cause _my_children_changed_func() to be called whenever a children_changed signal with the add detail is emitted on the AtkObject my_atk_obj.