| 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 enum { |
| 27 |
WIFI_INFO_NONE = 0, |
| 28 |
WIFI_INFO_SIGNAL_STRENGTH_LEVEL, |
| 29 |
WIFI_INFO_SIGNAL_STRENGTH_PERCENT, |
| 30 |
WIFI_INFO_SIGNAL_STRENGTH_DB, |
| 31 |
WIFI_NB_INFO_TYPE |
| 32 |
} CDWifiInfoType; |
| 33 |
|
| 34 |
typedef enum { |
| 35 |
WIFI_QUALITY_NO_SIGNAL = 0, |
| 36 |
WIFI_QUALITY_VERY_LOW, |
| 37 |
WIFI_QUALITY_LOW, |
| 38 |
WIFI_QUALITY_MIDDLE, |
| 39 |
WIFI_QUALITY_GOOD, |
| 40 |
WIFI_QUALITY_EXCELLENT, |
| 41 |
WIFI_NB_QUALITY |
| 42 |
} CDWifiQuality; |
| 43 |
|
| 44 |
|
| 45 |
typedef enum _CDWifiDisplayType { |
| 46 |
CD_WIFI_GAUGE=0, |
| 47 |
CD_WIFI_GRAPH, |
| 48 |
CD_WIFI_BAR, |
| 49 |
CD_WIFI_NB_TYPES |
| 50 |
} CDWifiDisplayType; |
| 51 |
|
| 52 |
struct _AppletConfig { |
| 53 |
gchar *defaultTitle; |
| 54 |
gchar *cDefaultIcon; |
| 55 |
gchar *cNoSignalIcon; |
| 56 |
gchar *cGThemePath; |
| 57 |
gchar *cUserCommand; |
| 58 |
|
| 59 |
CDWifiInfoType quickInfoType; |
| 60 |
CDWifiDisplayType iDisplayType; |
| 61 |
|
| 62 |
gint iCheckInterval; |
| 63 |
|
| 64 |
CairoDockTypeGraph iGraphType; |
| 65 |
gdouble fLowColor[3]; |
| 66 |
gdouble fHigholor[3]; |
| 67 |
gdouble fBgColor[4]; |
| 68 |
gdouble fSmoothFactor; |
| 69 |
}; |
| 70 |
|
| 71 |
struct _AppletData { |
| 72 |
// shared memory |
| 73 |
CDWifiQuality iQuality, iPreviousQuality; |
| 74 |
gint iPercent, iPrevPercent; |
| 75 |
gint iSignalLevel, iPrevSignalLevel; |
| 76 |
gint iPrevNoiseLevel, iNoiseLevel; |
| 77 |
gchar *cESSID; |
| 78 |
gchar *cInterface; |
| 79 |
gchar *cAccessPoint; |
| 80 |
// end of shared memory |
| 81 |
gboolean bWirelessExt; |
| 82 |
GldiTask *pTask; |
| 83 |
gchar *cIWConfigPath; |
| 84 |
}; |
| 85 |
|
| 86 |
|
| 87 |
#endif |