147
151
hud_source_search (HudSource *source,
148
GPtrArray *results_array,
149
HudTokenList *search_string)
152
HudTokenList *search_string,
153
void (*append_func) (HudResult * result, gpointer user_data),
151
156
g_debug ("search on %s %p", G_OBJECT_TYPE_NAME (source), source);
153
HUD_SOURCE_GET_IFACE (source)
154
->search (source, results_array, search_string);
158
HudSourceInterface * iface = HUD_SOURCE_GET_IFACE (source);
159
if (iface->unuse != NULL) {
160
return iface->search(source, search_string, append_func, user_data);
165
hud_source_list_applications (HudSource *source,
166
HudTokenList *search_tokens,
167
void (*append_func) (const gchar *application_id, const gchar *application_icon, HudSourceItemType type, gpointer user_data),
170
g_debug ("list_applications on %s %p", G_OBJECT_TYPE_NAME (source), source);
172
HudSourceInterface * iface = HUD_SOURCE_GET_IFACE (source);
173
if (iface->list_applications != NULL) {
174
return iface->list_applications(source, search_tokens, append_func, user_data);
180
* @source; a #HudSource
182
* Mark a #HudSource as "in use" (ie: actively being queried).
184
* Gets the last source that is responsible of giving results for application_id
187
hud_source_get (HudSource *source,
188
const gchar *application_id)
190
g_return_val_if_fail (HUD_IS_SOURCE (source), NULL);
192
g_debug ("get on %s %p", G_OBJECT_TYPE_NAME (source), source);
194
HudSourceInterface * iface = HUD_SOURCE_GET_IFACE (source);
195
if (iface->get != NULL) {
196
return iface->get(source, application_id);
203
* hud_source_activate_toolbar:
204
* @source; a #HudSource
206
* Activate a toolbar item on a source
209
hud_source_activate_toolbar (HudSource * source, HudClientQueryToolbarItems item, GVariant *platform_data)
211
g_return_if_fail (HUD_IS_SOURCE (source));
213
g_debug ("activate toolbar on %s %p", G_OBJECT_TYPE_NAME (source), source);
215
HudSourceInterface * iface = HUD_SOURCE_GET_IFACE (source);
216
if (iface->activate_toolbar != NULL) {
217
return iface->activate_toolbar(source, item, platform_data);
224
* hud_source_get_items:
225
* @collector: a #HudDbusmenuCollector
227
* Gets the items that have been collected at any point in time.
229
* Return Value: (element-type HudItem) (transfer full) A list of #HudItem
230
* objects. Free with g_list_free_full(g_object_unref)
233
hud_source_get_items (HudSource *source)
235
g_return_val_if_fail(HUD_IS_SOURCE(source), NULL);
237
g_debug ("get_items on %s %p", G_OBJECT_TYPE_NAME (source), source);
239
HudSourceInterface * iface = HUD_SOURCE_GET_IFACE (source);
240
if (iface->get_items != NULL) {
241
return iface->get_items(source);
168
258
hud_source_changed (HudSource *source)
170
g_debug ("%s %p changed", G_OBJECT_TYPE_NAME (source), source);
172
260
g_signal_emit (source, hud_source_changed_signal, 0);
264
* hud_source_get_app_id:
265
* @source: a #HudSource
267
* Get the application ID. Shouldn't be implemented by list
270
* Return value: The ID of the application
273
hud_source_get_app_id (HudSource * source)
275
g_return_val_if_fail(HUD_IS_SOURCE(source), NULL);
277
HudSourceInterface * iface = HUD_SOURCE_GET_IFACE (source);
278
if (iface->get_app_id != NULL) {
279
return iface->get_app_id(source);
286
* hud_source_get_app_icon:
287
* @source: a #HudSource
289
* Get the application icon. Shouldn't be implemented by list
292
* Return value: The icon of the application
295
hud_source_get_app_icon (HudSource * source)
297
g_return_val_if_fail(HUD_IS_SOURCE(source), NULL);
299
HudSourceInterface * iface = HUD_SOURCE_GET_IFACE (source);
300
if (iface->get_app_icon != NULL) {
301
return iface->get_app_icon(source);