8 #ifndef YGTK_PKG_QUERY_WIDGET_H
9 #define YGTK_PKG_QUERY_WIDGET_H
12 #include "yzyppwrapper.h"
17 virtual GtkWidget *getWidget() = 0;
22 virtual bool begsUpdate() = 0;
23 virtual void updateList (
Ypp::List list) = 0;
25 virtual void clearSelection() = 0;
28 virtual GtkWidget *createToolbox() {
return NULL; }
31 virtual void refreshQuery() = 0;
34 virtual void setListener (
Listener *listener) { this->listener = listener; }
40 void notify() {
if (listener) listener->refreshQuery(); }
42 void notifyDelay (
int delay)
44 static guint timeout_id = 0;
46 static gboolean timeout_cb (gpointer data)
54 if (timeout_id) g_source_remove (timeout_id);
55 timeout_id = g_timeout_add_full (
56 G_PRIORITY_LOW, delay, inner::timeout_cb,
this, NULL);