Debian Codegraph @

shortcuts/src/applet-struct.h

raw
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 __APPLET_STRUCT__
22 #define __APPLET_STRUCT__
23
24 #include <cairo-dock.h>
25
26 #define CD_VOLUME_ID_BOOKMARK_CMD -1
27
28 typedef enum {
29 CD_SHOW_NOTHING=0,
30 CD_SHOW_FREE_SPACE,
31 CD_SHOW_USED_SPACE,
32 CD_SHOW_FREE_SPACE_PERCENT,
33 CD_SHOW_USED_SPACE_PERCENT,
34 CD_NB_SHOW
35 } CDDiskUsageDisplayType;
36
37 typedef enum {
38 CD_DRIVE_GROUP=6,
39 CD_NETWORK_GROUP=8,
40 CD_BOOKMARK_GROUP=10
41 } CDShortcutsGroup;
42
43 typedef enum {
44 CD_DESKLET_SLIDE=0,
45 CD_DESKLET_TREE,
46 CD_DESKLET_NB_RENDERER
47 } CDDeskletRendererType;
48
49 struct _AppletConfig {
50 gboolean bListDrives;
51 gboolean bListNetwork;
52 gboolean bListBookmarks;
53 CDDiskUsageDisplayType iDisplayType;
54 gint iCheckInterval;
55 gboolean bDrawBar;
56 gchar *cRenderer;
57 CDDeskletRendererType iDeskletRendererType;
58 } ;
59
60 typedef struct _CDDiskUsage {
61 // for disks
62 long long iPrevAvail;
63 long long iAvail;
64 long long iFree;
65 long long iTotal;
66 long long iUsed;
67 int iType;
68 // for bookmarks
69 int iLastCheckTime;
70 } CDDiskUsage;
71
72
73 typedef struct {
74 gboolean bListDrives;
75 gboolean bListNetwork;
76 gboolean bListBookmarks;
77 gchar *cDisksURI;
78 gchar *cNetworkURI;
79 gchar *cBookmarksURI;
80 GList *pIconList;
81 GldiModuleInstance *pApplet;
82 } CDSharedMemory;
83
84 struct _AppletData {
85 GldiTask *pTask;
86 gchar *cDisksURI;
87 gchar *cNetworkURI;
88 gchar *cBookmarksURI;
89 GldiTask *pDiskTask; // tache non threadee.
90 gchar *cLastCreatedUri;
91 gchar *cLastDeletedUri;
92 gboolean bShowMenuPending;
93 } ;
94
95
96 #endif