1 #include <libnautilus-private/nautilus-search-engine.h>
5 hits_added_cb (NautilusSearchEngine
*engine
, GSList
*hits
)
7 g_print ("hits added\n");
9 g_print (" - %s\n", (char *)hits
->data
);
15 hits_subtracted_cb (NautilusSearchEngine
*engine
, GSList
*hits
)
17 g_print ("hits subtracted\n");
19 g_print (" - %s\n", (char *)hits
->data
);
25 finished_cb (NautilusSearchEngine
*engine
)
27 g_print ("finished!\n");
32 main (int argc
, char* argv
[])
34 NautilusSearchEngine
*engine
;
39 gtk_init (&argc
, &argv
);
41 engine
= nautilus_search_engine_new ();
42 g_signal_connect (engine
, "hits-added",
43 G_CALLBACK (hits_added_cb
), NULL
);
44 g_signal_connect (engine
, "hits-subtracted",
45 G_CALLBACK (hits_subtracted_cb
), NULL
);
46 g_signal_connect (engine
, "finished",
47 G_CALLBACK (finished_cb
), NULL
);
49 query
= nautilus_query_new ();
50 nautilus_query_set_text (query
, "richard hult");
51 nautilus_search_engine_set_query (engine
, query
);
52 g_object_unref (query
);
54 nautilus_search_engine_start (engine
);