2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
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.
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/>.
21
#ifndef __CD_INDICATOR_APPLET__
22
#define __CD_INDICATOR_APPLET__
24
#include <cairo-dock.h>
26
#include <libindicator/indicator.h>
27
#include <libindicator/indicator-object.h>
28
#include <libindicator/indicator-service-manager.h>
30
#include <libdbusmenu-gtk/menuitem.h>
31
#include <libdbusmenu-gtk/menu.h>
33
typedef struct _CDAppletIndicator CDAppletIndicator;
35
struct _CDAppletIndicator {
36
IndicatorServiceManager *service;
37
DBusGProxy * pServiceProxy;
38
DbusmenuGtkMenu *pMenu;
39
guint iSidGetMenuOnce;
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);
54
CDAppletIndicator *cd_indicator_new (CairoDockModuleInstance *pApplet, const gchar *cBusName, const gchar *cObjectName, const gchar *cServiceInterface, const gchar *cMenuObject);
56
void cd_indicator_destroy (CDAppletIndicator *pIndicator);
58
void cd_indicator_set_icon (CDAppletIndicator *pIndicator, const gchar *cStatusIcon);
60
void cd_indicator_reload_icon (CDAppletIndicator *pIndicator);
62
void cd_indicator_show_menu (CDAppletIndicator *pIndicator);