Back to index

indicator-appmenu  12.10.0
hudquery.h
Go to the documentation of this file.
00001 /*
00002  * Copyright © 2012 Canonical Ltd.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License version 3, as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranties of
00010  * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License along
00014  * with this program.  If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  * Author: Ryan Lortie <desrt@desrt.ca>
00017  */
00018 
00019 #ifndef __HUD_QUERY_H__
00020 #define __HUD_QUERY_H__
00021 
00022 #include "hudsource.h"
00023 #include "hudresult.h"
00024 
00025 #define HUD_TYPE_QUERY                                      (hud_query_get_type ())
00026 #define HUD_QUERY(inst)                                     (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
00027                                                              HUD_TYPE_QUERY, HudQuery))
00028 #define HUD_IS_QUERY(inst)                                  (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
00029                                                              HUD_TYPE_QUERY))
00030 
00031 typedef struct _HudQuery                                    HudQuery;
00032 
00033 GType                   hud_query_get_type                              (void);
00034 
00035 HudQuery *              hud_query_new                                   (HudSource   *source,
00036                                                                          const gchar *search_string,
00037                                                                          gint         num_results);
00038 
00039 GVariant *              hud_query_get_query_key                         (HudQuery    *query);
00040 
00041 HudResult *             hud_query_get_result_by_index                   (HudQuery    *query,
00042                                                                          guint        i);
00043 
00044 guint                   hud_query_get_n_results                         (HudQuery    *query);
00045 
00046 void                    hud_query_close                                 (HudQuery    *query);
00047 
00048 HudQuery *              hud_query_lookup                                (GVariant    *query_key);
00049 
00050 #endif /* __HUD_QUERY_H__ */