~ubuntu-branches/ubuntu/maverick/cairo-dock/maverick

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-09 23:26:12 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20100809232612-yp4c6ig3jt1bzpdv
Tags: 2.2.0~0beta4-0ubuntu1
* New Upstream Version (LP: #614624)
* Fixed a few bugs on LP:
 - LP: #518453: Dock appears under all windows
                 (Compiz - fullscreen window)
 - LP: #521369: Separator are not removed when closing
                 grouped windows
 - LP: #521762: Some sentences are not correct
 - LP: #526466: Icons of apps with same class shouldn't
                 be stacked by default
 - LP: #535083: Dialogues looks ugly when a lot of them
                 appears at the same time
 - More details on the 'ChangeLog' file
* debian/rules:
 - Autotools has been replaced by CMake
 - Man pages are now included in the source code
* debian/copyright:
 - Updated with the new pathes and new files
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev as Build-deps
 - Bump Standard-Version to 3.9.1
* debian/cairo-dock-core.install:
 - Man pages are now included in the source code
 - All sonames are now installed into lib32 or lib64
* debian/cairo-dock-dev.install:
 - pkgconfig is now installed into lib32 or lib64

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_SINGLE_INSTANCE__
 
22
#define  __CAIRO_DOCK_APPLET_SINGLE_INSTANCE__
 
23
 
 
24
#define myDrawContext myApplet->pDrawContext
 
25
 
 
26
#define CD_APPLET_DEFINE_BEGIN(cName, iMajorVersion, iMinorVersion, iMicroVersion, iAppletCategory, cDescription, cAuthor) \
 
27
Icon *myIcon; \
 
28
CairoContainer *myContainer; \
 
29
CairoDock *myDock; \
 
30
CairoDesklet *myDesklet; \
 
31
AppletConfig *myConfigPtr = NULL; \
 
32
AppletData *myDataPtr = NULL; \
 
33
CairoDockModuleInstance *myApplet = NULL; \
 
34
CD_APPLET_DEFINE_ALL_BEGIN (cName, iMajorVersion, iMinorVersion, iMicroVersion, iAppletCategory, cDescription, cAuthor) \
 
35
pVisitCard->bMultiInstance = FALSE;
 
36
 
 
37
#define CD_APPLET_INIT_BEGIN \
 
38
CD_APPLET_INIT_ALL_BEGIN(pApplet) \
 
39
myApplet = pApplet; \
 
40
myIcon = myApplet->pIcon; \
 
41
myContainer = myApplet->pContainer; \
 
42
myDock = myApplet->pDock; \
 
43
myDesklet = myApplet->pDesklet;
 
44
 
 
45
#define myConfig (* myConfigPtr)
 
46
#define myData (* myDataPtr)
 
47
 
 
48
 
 
49
#define CD_APPLET_RELOAD_BEGIN \
 
50
        CD_APPLET_RELOAD_ALL_BEGIN \
 
51
        myContainer = myApplet->pContainer; \
 
52
        myDock = myApplet->pDock; \
 
53
        myDesklet = myApplet->pDesklet; \
 
54
 
 
55
 
 
56
#define CD_APPLET_RESET_DATA_END \
 
57
        myDock = NULL; \
 
58
        myContainer = NULL; \
 
59
        myIcon = NULL; \
 
60
        if (myDataPtr) memset (myDataPtr, 0, sizeof (AppletData)); \
 
61
        myDataPtr = NULL; \
 
62
        myDesklet = NULL; \
 
63
        myApplet = NULL; \
 
64
        CD_APPLET_RESET_DATA_ALL_END
 
65
 
 
66
 
 
67
#define CD_APPLET_RESET_CONFIG_BEGIN \
 
68
        CD_APPLET_RESET_CONFIG_ALL_BEGIN \
 
69
        if (myConfigPtr == NULL) \
 
70
                return ;
 
71
 
 
72
#define CD_APPLET_RESET_CONFIG_END \
 
73
        myConfigPtr = NULL; \
 
74
        CD_APPLET_RESET_CONFIG_ALL_END
 
75
 
 
76
#define CD_APPLET_GET_CONFIG_BEGIN \
 
77
        CD_APPLET_GET_CONFIG_ALL_BEGIN\
 
78
        if (myConfigPtr == NULL)\
 
79
                myConfigPtr = (((gpointer)myApplet)+sizeof(CairoDockModuleInstance));\
 
80
        if (myDataPtr == NULL)\
 
81
                myDataPtr = (((gpointer)myConfigPtr)+sizeof(AppletConfig));
 
82
 
 
83
 
 
84
extern Icon *myIcon;
 
85
extern CairoContainer *myContainer;
 
86
extern CairoDock *myDock;
 
87
extern CairoDesklet *myDesklet;
 
88
extern AppletConfig *myConfigPtr;
 
89
extern AppletData *myDataPtr;
 
90
extern CairoDockModuleInstance *myApplet;
 
91
 
 
92
#endif