| 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_APPLET_STRUCT__ |
| 22 |
#define __CD_APPLET_STRUCT__ |
| 23 |
|
| 24 |
#include <cairo-dock.h> |
| 25 |
|
| 26 |
#define CD_DBUS_APPLETS_FOLDER "third-party" |
| 27 |
|
| 28 |
//\___________ structure containing the applet's configuration parameters. |
| 29 |
struct _AppletConfig { |
| 30 |
gboolean bEnableReboot; |
| 31 |
gboolean bEnableDesklets; |
| 32 |
gboolean bEnableReloadModule; |
| 33 |
gboolean bEnableActivateModule; |
| 34 |
gboolean bEnableQuit; |
| 35 |
gboolean bEnableShowDock; |
| 36 |
gboolean bEnableTweakingLauncher; |
| 37 |
gboolean bEnableCreateLauncher; |
| 38 |
gboolean bEnableSetQuickInfo; |
| 39 |
gboolean bEnableSetLabel; |
| 40 |
gboolean bEnableSetIcon; |
| 41 |
gboolean bEnablePopUp; |
| 42 |
gboolean bEnableAnimateIcon; |
| 43 |
gboolean bEnableNewModule; |
| 44 |
gboolean bLaunchLauncherAPIDaemon; |
| 45 |
} ; |
| 46 |
|
| 47 |
|
| 48 |
typedef struct _dbusMainObject dbusMainObject; |
| 49 |
typedef struct _dbusApplet dbusApplet; |
| 50 |
typedef struct _dbusSubApplet dbusSubApplet; |
| 51 |
|
| 52 |
struct _dbusMainObject { |
| 53 |
GObject parent; |
| 54 |
DBusGConnection *connection; |
| 55 |
}; |
| 56 |
typedef struct { |
| 57 |
GObjectClass parent_class; |
| 58 |
} dbusMainObjectClass; |
| 59 |
|
| 60 |
|
| 61 |
struct _dbusApplet { |
| 62 |
GObject parent; |
| 63 |
DBusGConnection *connection; |
| 64 |
DBusGProxy *proxy; |
| 65 |
GldiModuleInstance *pModuleInstance; |
| 66 |
gchar *cModuleName; |
| 67 |
gint id; |
| 68 |
gchar *cBusPath; |
| 69 |
dbusSubApplet *pSubApplet; |
| 70 |
CairoDialog *pDialog; |
| 71 |
GList *pShortkeyList; |
| 72 |
}; |
| 73 |
typedef struct { |
| 74 |
GObjectClass parent_class; |
| 75 |
} dbusAppletClass; |
| 76 |
|
| 77 |
|
| 78 |
struct _dbusSubApplet { |
| 79 |
GObject parent; |
| 80 |
dbusApplet *pApplet; |
| 81 |
}; |
| 82 |
typedef struct { |
| 83 |
GObjectClass parent_class; |
| 84 |
} dbusSubAppletClass; |
| 85 |
|
| 86 |
|
| 87 |
typedef enum { |
| 88 |
CLIC=0, |
| 89 |
MIDDLE_CLIC, |
| 90 |
SCROLL, |
| 91 |
BUILD_MENU, |
| 92 |
MENU_SELECT, |
| 93 |
DROP_DATA, |
| 94 |
CHANGE_FOCUS, |
| 95 |
RELOAD_MODULE, |
| 96 |
INIT_MODULE, |
| 97 |
STOP_MODULE, |
| 98 |
ANSWER, |
| 99 |
ANSWER_DIALOG, |
| 100 |
SHORTKEY, |
| 101 |
NB_SIGNALS |
| 102 |
} CDSignalEnum; |
| 103 |
|
| 104 |
|
| 105 |
#ifdef DBUSMENU_GTK_FOUND |
| 106 |
#include <libdbusmenu-gtk/menuitem.h> |
| 107 |
#include <libdbusmenu-gtk/client.h> |
| 108 |
|
| 109 |
typedef struct _CDIconData { |
| 110 |
gchar *cMenuPath; |
| 111 |
gchar *cBusName; |
| 112 |
DbusmenuGtkClient *client; |
| 113 |
GList *menu_items_list; |
| 114 |
} CDIconData; |
| 115 |
#endif |
| 116 |
|
| 117 |
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc. |
| 118 |
struct _AppletData { |
| 119 |
dbusMainObject *pMainObject; |
| 120 |
const gchar *cProgName; |
| 121 |
gchar *cBasePath; |
| 122 |
///GtkWidget *pModuleSubMenu; |
| 123 |
GtkWidget *pModuleMainMenu; |
| 124 |
dbusApplet *pCurrentMenuDbusApplet; |
| 125 |
gint iMenuPosition; |
| 126 |
GldiWindowActor *pActiveWindow;; |
| 127 |
GldiTask *pGetListTask; |
| 128 |
GList *pUpdateTasksList; |
| 129 |
} ; |
| 130 |
|
| 131 |
|
| 132 |
#endif |