~cairo-dock-team/cairo-dock-plug-ins/3.0.x

« back to all changes in this revision

Viewing changes to Indicator-applet/indicator-applet.h

  • Committer: fabounet
  • Date: 2010-05-27 16:55:02 UTC
  • Revision ID: fabounet03@gmail.com-20100527165502-22gb8xitlu1rfp5m
added the Indicator-applet framework

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
* This file is a part of the Cairo-Dock project
 
3
*
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
 
6
*
 
7
* This program is free software; you can redistribute it and/or
 
8
* modify it under the terms of the GNU General Public License
 
9
* as published by the Free Software Foundation; either version 3
 
10
* of the License, or (at your option) any later version.
 
11
*
 
12
* This program is distributed in the hope that it will be useful,
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
* GNU General Public License for more details.
 
16
* You should have received a copy of the GNU General Public License
 
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
*/
 
19
 
 
20
 
 
21
#ifndef __CD_INDICATOR_APPLET__
 
22
#define  __CD_INDICATOR_APPLET__
 
23
 
 
24
#include <cairo-dock.h>
 
25
 
 
26
#include <libindicator/indicator.h>
 
27
#include <libindicator/indicator-object.h>
 
28
#include <libindicator/indicator-service-manager.h>
 
29
 
 
30
#include <libdbusmenu-gtk/menuitem.h>
 
31
#include <libdbusmenu-gtk/menu.h>
 
32
 
 
33
typedef struct _CDAppletIndicator CDAppletIndicator;
 
34
 
 
35
struct _CDAppletIndicator {
 
36
        IndicatorServiceManager *service;
 
37
        DBusGProxy * pServiceProxy;
 
38
        DbusmenuGtkMenu *pMenu;
 
39
        guint iSidGetMenuOnce;
 
40
        gchar *cStatusIcon;
 
41
        const gchar *cBusName;
 
42
        const gchar *cServiceObject;
 
43
        const gchar *cServiceInterface;
 
44
        const gchar *cMenuObject;
 
45
        CairoDockModuleInstance *pApplet;
 
46
        void (*on_connect) (CairoDockModuleInstance *pApplet);
 
47
        void (*on_disconnect) (CairoDockModuleInstance *pApplet);
 
48
        void (*get_initial_values) (CairoDockModuleInstance *pApplet);
 
49
        void (*add_menu_handler) (DbusmenuGtkClient * client);
 
50
        };
 
51
 
 
52
 
 
53
 
 
54
CDAppletIndicator *cd_indicator_new (CairoDockModuleInstance *pApplet, const gchar *cBusName, const gchar *cObjectName, const gchar *cServiceInterface, const gchar *cMenuObject);
 
55
 
 
56
void cd_indicator_destroy (CDAppletIndicator *pIndicator);
 
57
 
 
58
void cd_indicator_set_icon (CDAppletIndicator *pIndicator, const gchar *cStatusIcon);
 
59
 
 
60
void cd_indicator_reload_icon (CDAppletIndicator *pIndicator);
 
61
 
 
62
void cd_indicator_show_menu (CDAppletIndicator *pIndicator);
 
63
 
 
64
 
 
65
#endif