IBusService * ibus_service_new (const gchar *path) { GObject *obj; obj = g_object_new (IBUS_TYPE_SERVICE, "path", path, NULL); return IBUS_SERVICE (obj); }
gboolean showSystray_apply_callback(PropertyContext * ctx, gpointer userData) { IBusChewingPreEdit *icPreEdit = (IBusChewingPreEdit *) ctx->parent; IBusService *service = IBUS_SERVICE(icPreEdit->engine); ibus_service_emit_signal(service, NULL, IBUS_INTERFACE_ENGINE, "config_changed", g_variant_new_string("show-systray"), NULL); return TRUE; }
int main() { g_type_init (); GMainLoop *mainloop; IBusConnection *connection; IBusService *service; mainloop = g_main_loop_new (NULL, FALSE); connection = ibus_connection_open ("unix:path=/tmp/ibus-phuang/ibus--0.0"); service = IBUS_SERVICE (ibus_engine_new ("/a/Engine", connection)); g_main_loop_run (mainloop); return 0; }