ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml);
}
+/**
+ * _panel_destroy_cb:
+ *
+ * A callback function which is called when (1) the connection to the panel process is terminated,
+ * or (2) ibus_proxy_destroy (ibus->panel); is called. See src/ibusproxy.c for details.
+ */
static void
_panel_destroy_cb (BusPanelProxy *panel,
BusIBusImpl *ibus)
}
}
+/**
+ * _config_destroy_cb:
+ *
+ * A callback function which is called when (1) the connection to the config process is terminated,
+ * or (2) ibus_proxy_destroy (ibus->config); is called. See src/ibusproxy.c for details.
+ */
static void
_config_destroy_cb (IBusConfig *config,
BusIBusImpl *ibus)
if (ibus->panel != NULL) {
ibus_proxy_destroy ((IBusProxy *) ibus->panel);
- /* panel should be NULL after destroy */
+ /* panel should be NULL after destroy. See _panel_destroy_cb for details. */
g_assert (ibus->panel == NULL);
}
if (ibus->config != NULL) {
ibus_proxy_destroy ((IBusProxy *) ibus->config);
- /* config should be NULL */
+ /* config should be NULL after destroy. See _config_destroy_cb for details. */
g_assert (ibus->config == NULL);
}
/* FIXME add match rules? */
}
+/**
+ * ibus_proxy_dispose:
+ *
+ * Override GObject's dispose function.
+ */
static void
ibus_proxy_dispose (GObject *object)
{
G_OBJECT_CLASS(ibus_proxy_parent_class)->dispose (object);
}
+/**
+ * ibus_proxy_real_destroy:
+ *
+ * Handle "destroy" signal which is emitted by ibus_proxy_dispose.
+ */
static void
ibus_proxy_real_destroy (IBusProxy *proxy)
{
GType ibus_proxy_get_type (void);
+/**
+ * ibus_proxy_destroy:
+ *
+ * Dispose the proxy object. If the dbus connection is alive and the own variable above
+ * is TRUE (which is the default), org.freedesktop.IBus.Service.Destroy method will be
+ * called. Note that "destroy" signal might be emitted when ibus_proxy_destroy is called
+ * or the underlying dbus connection for the proxy is terminated. In the callback of the
+ * destroy signal, you might have to call something like 'g_object_unref(the_proxy);'.
+ */
void ibus_proxy_destroy (IBusProxy *proxy);
G_END_DECLS