| 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 |
typedef struct _CDWM { |
| 27 |
const gchar *cName; |
| 28 |
const gchar *cCommand; |
| 29 |
const gchar *cConfigTool; |
| 30 |
gboolean bIsAvailable; |
| 31 |
void (*activate_composite) (gboolean bActive); |
| 32 |
} CDWM; |
| 33 |
|
| 34 |
typedef enum { |
| 35 |
CD_COMPIZ, |
| 36 |
CD_KWIN, |
| 37 |
CD_XFWM, |
| 38 |
CD_METACITY, |
| 39 |
CD_CUSTOM_WMFB, |
| 40 |
CD_CUSTOM_WMC, |
| 41 |
NB_WM |
| 42 |
} CDWMIndex; |
| 43 |
|
| 44 |
#define NB_COMPOSITE_WM 4 // 4 of them can do composite |
| 45 |
#define NB_FALLBACK_WM 3 // 3 of them can do without |
| 46 |
|
| 47 |
typedef enum { |
| 48 |
CD_EDIT_CONFIG, |
| 49 |
CD_RELOAD_WM, |
| 50 |
CD_SHOW_DESKTOP, |
| 51 |
CD_EXPOSE_DESKTOPS, |
| 52 |
CD_EXPOSE_WINDOWS, |
| 53 |
CD_SHOW_WIDGET_LAYER, |
| 54 |
CD_NB_ACTIONS |
| 55 |
} CDWMAction; |
| 56 |
|
| 57 |
//\___________ structure containing the applet's configuration parameters. |
| 58 |
struct _AppletConfig { |
| 59 |
gchar *cWmCompositor; |
| 60 |
gchar *cWmFallback; |
| 61 |
gchar *cIconCompositeON; |
| 62 |
gchar *cIconCompositeOFF; |
| 63 |
gboolean bAskBeforeSwitching; |
| 64 |
CDWMAction iActionOnMiddleClick; |
| 65 |
gchar *cShortcut; |
| 66 |
} ; |
| 67 |
|
| 68 |
typedef struct { |
| 69 |
gchar *which; |
| 70 |
gchar *ps; |
| 71 |
} CDSharedMemory; |
| 72 |
|
| 73 |
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc. |
| 74 |
struct _AppletData { |
| 75 |
GldiTask *pTask; |
| 76 |
CDWM pWmList[NB_WM]; |
| 77 |
gboolean bIsComposited; |
| 78 |
CDWM *wmc; |
| 79 |
CDWM *wmfb; |
| 80 |
GldiShortkey *cKeyBinding; |
| 81 |
} ; |
| 82 |
|
| 83 |
|
| 84 |
#endif |