~unity-team/compiz/plugins-main-trunk.fix_wrong_window_move_expo

« back to all changes in this revision

Viewing changes to animation/include/animation/window.h

  • Committer: David Barth
  • Date: 2011-03-29 16:36:40 UTC
  • Revision ID: david.barth@canonical.com-20110329163640-fpen5qsoo0lbjode
initial import from compiz-plugins-main_0.9.4git20110322.orig.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef ANIMATION_WINDOW_H
 
2
#define ANIMATION_WINDOW_H
 
3
#include "animation.h"
 
4
class AnimWindow :
 
5
    public PluginClassHandler<AnimWindow, CompWindow, ANIMATION_ABI>
 
6
{
 
7
     friend class PrivateAnimScreen;
 
8
     friend class PrivateAnimWindow;
 
9
     friend class AnimScreen;
 
10
     friend class Animation;
 
11
     
 
12
public:
 
13
     AnimWindow (CompWindow *);
 
14
     ~AnimWindow ();
 
15
     
 
16
     BoxPtr BB ();
 
17
     CompRegion &stepRegion ();
 
18
     void resetStepRegionWithBB ();
 
19
     
 
20
     void expandBBWithWindow ();
 
21
     void expandBBWithScreen ();
 
22
     void expandBBWithBox (Box &source);
 
23
     void expandBBWithPoint (float fx, float fy);
 
24
     void expandBBWithPoint2DTransform (GLVector &coords,
 
25
                                        GLMatrix &transformMat);
 
26
     bool expandBBWithPoints3DTransform (CompOutput     &output,
 
27
                                         GLMatrix       &transform,
 
28
                                         const float    *points,
 
29
                                         GridAnim::GridModel::GridObject *objects,
 
30
                                         unsigned int   nPoints);
 
31
     
 
32
     inline bool savedRectsValid () { return mSavedRectsValid; }
 
33
     inline CompRect & saveWinRect () { return mSavedWinRect; }
 
34
     inline CompRect & savedInRect () { return mSavedInRect; }
 
35
     inline CompRect & savedOutRect () { return mSavedOutRect; }
 
36
     inline CompWindowExtents & savedOutExtents () { return mSavedOutExtents; }
 
37
     
 
38
     Animation *curAnimation ();
 
39
     void createFocusAnimation (AnimEffect effect, int duration = 0);
 
40
     
 
41
     void postAnimationCleanUp ();
 
42
     
 
43
     // TODO: Group persistent data for a plugin and allow a plugin to only
 
44
     // delete its own data.
 
45
     void deletePersistentData (const char *name);
 
46
     
 
47
     /// A "string -> persistent data" map for animations that require such data,
 
48
     /// like some focus animations.
 
49
     PersistentDataMap persistentData;
 
50
     
 
51
     CompWindow *mWindow;    ///< Window being animated. // TODO move to private:
 
52
private:
 
53
     PrivateAnimWindow *priv;
 
54
     
 
55
     
 
56
     bool mSavedRectsValid;
 
57
     CompRect mSavedWinRect; ///< Saved window contents geometry
 
58
     CompRect mSavedInRect;   ///< Saved window input geometry
 
59
     CompRect mSavedOutRect;  ///< Saved window output geometry
 
60
     CompWindowExtents mSavedOutExtents; ///< Saved window output extents
 
61
     
 
62
     CompOption::Value &pluginOptVal (ExtensionPluginInfo *pluginInfo,
 
63
                                      unsigned int optionId,
 
64
                                      Animation *anim);
 
65
     
 
66
};
 
67
#endif