Back to index

unity  6.0.0
panel-service.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010 Canonical Ltd
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it 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,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  * Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
00017  */
00018 
00019 #ifndef _PANEL_SERVICE_H_
00020 #define _PANEL_SERVICE_H_
00021 
00022 #include <glib-object.h>
00023 #include <libindicator/indicator.h>
00024 #include <libindicator/indicator-object.h>
00025 
00026 G_BEGIN_DECLS
00027 
00028 #define PANEL_TYPE_SERVICE (panel_service_get_type ())
00029 
00030 #define PANEL_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
00031        PANEL_TYPE_SERVICE, PanelService))
00032 
00033 #define PANEL_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
00034        PANEL_TYPE_SERVICE, PanelServiceClass))
00035 
00036 #define PANEL_IS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
00037        PANEL_TYPE_SERVICE))
00038 
00039 #define PANEL_IS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
00040        PANEL_TYPE_SERVICE))
00041 
00042 #define PANEL_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
00043        PANEL_TYPE_SERVICE, PanelServiceClass))
00044 
00045 typedef struct _PanelService        PanelService;
00046 typedef struct _PanelServiceClass   PanelServiceClass;
00047 typedef struct _PanelServicePrivate PanelServicePrivate;
00048 
00049 struct _PanelService
00050 {
00051   GObject              parent;
00052 
00053   PanelServicePrivate *priv;
00054 };
00055 
00056 struct _PanelServiceClass
00057 {
00058   GObjectClass   parent_class;
00059 
00060   /*< private >*/
00061   void (*_view_padding1) (void);
00062   void (*_view_padding2) (void);
00063   void (*_view_padding3) (void);
00064   void (*_view_padding4) (void);
00065   void (*_view_padding5) (void);
00066   void (*_view_padding6) (void);
00067 };
00068 
00069 GType             panel_service_get_type      (void) G_GNUC_CONST;
00070 
00071 PanelService    * panel_service_get_default   ();
00072 
00073 PanelService    * panel_service_get_default_with_indicators (GList *indicators);
00074 
00075 guint             panel_service_get_n_indicators (PanelService *self);
00076 
00077 IndicatorObject * panel_service_get_indicator_nth (PanelService *self, guint position);
00078 IndicatorObject * panel_service_get_indicator (PanelService *self, const gchar *indicator_id);
00079 
00080 void              panel_service_remove_indicator (PanelService *self, IndicatorObject *indicator);
00081 
00082 void              panel_service_clear_indicators (PanelService *self);
00083 
00084 GVariant        * panel_service_sync          (PanelService *self);
00085 
00086 GVariant        * panel_service_sync_one      (PanelService *self,
00087                                           const gchar  *indicator_id);
00088 void              panel_service_sync_geometry (PanelService *self,
00089                                           const gchar  *indicator_id,
00090                                           const gchar  *entry_id,
00091                                           gint          x,
00092                                           gint          y,
00093                                           gint          width,
00094                                           gint          height);
00095 
00096 void              panel_service_show_entry    (PanelService *self,
00097                                           const gchar  *entry_id,
00098                                           guint32       xid,
00099                                           gint32        x,
00100                                           gint32        y,
00101                                           guint32       button,
00102                                           guint32       timestamp);
00103 
00104 void              panel_service_show_app_menu (PanelService *self,
00105                                           guint32       xid,
00106                                           gint32        x,
00107                                           gint32        y,
00108                                           guint32       timestamp);
00109 
00110 void              panel_service_secondary_activate_entry (PanelService *self,
00111                                           const gchar  *entry_id,
00112                                           guint32       timestamp);
00113 
00114 void              panel_service_scroll_entry   (PanelService *self,
00115                                           const gchar  *entry_id,
00116                                           gint32       delta);
00117 
00118 G_END_DECLS
00119 
00120 #endif /* _PANEL_SERVICE_H_ */