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 __CAIRO_DOCK_APPLET_MULTI_INSTANCE__
22
#define __CAIRO_DOCK_APPLET_MULTI_INSTANCE__
25
#define CD_APPLET_DEFINE_BEGIN(cName, iMajorVersion, iMinorVersion, iMicroVersion, iAppletCategory, cDescription, cAuthor) \
26
CD_APPLET_DEFINE_ALL_BEGIN (cName, iMajorVersion, iMinorVersion, iMicroVersion, iAppletCategory, cDescription, cAuthor) \
27
pVisitCard->bMultiInstance = TRUE;
30
#define CD_APPLET_INIT_BEGIN CD_APPLET_INIT_ALL_BEGIN (myApplet)
32
#define myIcon myApplet->pIcon
33
#define myContainer myApplet->pContainer
34
#define myDock myApplet->pDock
35
#define myDesklet myApplet->pDesklet
36
#define myDrawContext myApplet->pDrawContext
37
#define myConfigPtr ((AppletConfig *)(((gpointer)myApplet)+sizeof(CairoDockModuleInstance)))
38
#define myConfig (*myConfigPtr)
39
#define myDataPtr ((AppletData *)(((gpointer)myApplet)+sizeof(CairoDockModuleInstance)+sizeof(AppletConfig)))
40
#define myData (*myDataPtr)
42
#define CD_APPLET_RELOAD_BEGIN CD_APPLET_RELOAD_ALL_BEGIN
44
#define CD_APPLET_RESET_DATA_END \
45
memset (&myData, 0, sizeof (AppletData)); \
46
CD_APPLET_RESET_DATA_ALL_END
48
#define CD_APPLET_RESET_CONFIG_BEGIN CD_APPLET_RESET_CONFIG_ALL_BEGIN
50
#define CD_APPLET_RESET_CONFIG_END CD_APPLET_RESET_CONFIG_ALL_END
52
#define CD_APPLET_GET_CONFIG_BEGIN CD_APPLET_GET_CONFIG_ALL_BEGIN