~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-applet-multi-instance.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-09 23:26:12 UTC
  • mto: (18.1.1 cairo-dock) (19.1.1 cairo-dock)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20100809232612-pocdxliaxjdetm37
Tags: upstream-2.2.0~0beta4
ImportĀ upstreamĀ versionĀ 2.2.0~0beta4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 __CAIRO_DOCK_APPLET_MULTI_INSTANCE__
 
22
#define  __CAIRO_DOCK_APPLET_MULTI_INSTANCE__
 
23
 
 
24
 
 
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;
 
28
 
 
29
 
 
30
#define CD_APPLET_INIT_BEGIN CD_APPLET_INIT_ALL_BEGIN (myApplet)
 
31
 
 
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)
 
41
 
 
42
#define CD_APPLET_RELOAD_BEGIN CD_APPLET_RELOAD_ALL_BEGIN
 
43
 
 
44
#define CD_APPLET_RESET_DATA_END \
 
45
        memset (&myData, 0, sizeof (AppletData)); \
 
46
        CD_APPLET_RESET_DATA_ALL_END
 
47
 
 
48
#define CD_APPLET_RESET_CONFIG_BEGIN CD_APPLET_RESET_CONFIG_ALL_BEGIN
 
49
 
 
50
#define CD_APPLET_RESET_CONFIG_END CD_APPLET_RESET_CONFIG_ALL_END
 
51
 
 
52
#define CD_APPLET_GET_CONFIG_BEGIN CD_APPLET_GET_CONFIG_ALL_BEGIN
 
53
 
 
54
 
 
55
#endif