Back to index

indicator-appmenu  12.10.0
hudsource.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_SOURCE_H__
00020 #define __HUD_SOURCE_H__
00021 
00022 #include "huditem.h"
00023 
00024 #define HUD_TYPE_SOURCE                                     (hud_source_get_type ())
00025 #define HUD_SOURCE(inst)                                    (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
00026                                                              HUD_TYPE_SOURCE, HudSource))
00027 #define HUD_IS_SOURCE(inst)                                 (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
00028                                                              HUD_TYPE_SOURCE))
00029 #define HUD_SOURCE_GET_IFACE(inst)                          (G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
00030                                                              HUD_TYPE_SOURCE, HudSourceInterface))
00031 
00032 typedef struct _HudSourceInterface                          HudSourceInterface;
00033 typedef struct _HudSource                                   HudSource;
00034 
00035 struct _HudSourceInterface
00036 {
00037   GTypeInterface g_iface;
00038 
00039   void (* use)    (HudSource    *source);
00040   void (* unuse)  (HudSource    *source);
00041   void (* search) (HudSource    *source,
00042                    GPtrArray    *results_array,
00043                    HudTokenList *search_tokens);
00044 };
00045 
00046 GType                   hud_source_get_type                             (void);
00047 
00048 void                    hud_source_use                                  (HudSource    *source);
00049 void                    hud_source_unuse                                (HudSource    *source);
00050 
00051 void                    hud_source_search                               (HudSource    *source,
00052                                                                          GPtrArray    *results_array,
00053                                                                          HudTokenList *search_tokens);
00054 
00055 void                    hud_source_changed                              (HudSource    *source);
00056 
00057 #endif /* __HUD_SOURCE_H__ */