/usr/include/compiz/animation/grid.h is in compiz-dev 1:0.9.12.2+16.04.20160415-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | #ifndef ANIMATION_GRID_H
#define ANIMATION_GRID_H
#include "animation.h"
class GridAnim :
virtual public Animation
{
public:
class GridModel
{
friend class GridAnim;
public:
GridModel (CompWindow *w,
WindowEvent curWindowEvent,
int height,
int gridWidth,
int gridHeight,
int decorTopHeight,
int decorBottomHeight);
~GridModel ();
void move (float tx, float ty);
class GridObject
{
friend class GridAnim;
friend class GridZoomAnim;
friend class GridTransformAnim;
public:
GridObject ();
void setGridPosition (Point &gridPosition);
inline Point3d &position () { return mPosition; }
inline Point &gridPosition () { return mGridPosition; }
inline Point &offsetTexCoordForQuadBefore ()
{ return mOffsetTexCoordForQuadBefore; }
inline Point &offsetTexCoordForQuadAfter ()
{ return mOffsetTexCoordForQuadAfter; }
private:
Point3d mPosition; ///< Position on screen
Point mGridPosition; ///< Position on window in [0,1] range
Point mOffsetTexCoordForQuadBefore;
Point mOffsetTexCoordForQuadAfter;
///< Texture x, y coordinates will be offset by given amounts
///< for quads that fall after and before this object in x and y directions.
///< Currently only y offset can be used.
};
inline GridObject *objects () { return mObjects; }
inline unsigned int numObjects () { return mNumObjects; }
inline Point &scale () { return mScale; }
private:
GridObject *mObjects; // TODO: convert to vector
unsigned int mNumObjects;
Point mScale;
Point mScaleOrigin;
void initObjects (WindowEvent curWindowEvent,
int height,
int gridWidth, int gridHeight,
int decorTopHeight, int decorBottomHeight);
};
protected:
GridModel *mModel;
int mGridWidth; ///< Number of cells along grid width
int mGridHeight; ///< Number of cells along grid height
/// true if effect needs Q texture coordinates.
/// Q texture coordinates are used to avoid jagged-looking quads
/// ( http://www.r3.nu/~cass/qcoord/ )
bool mUseQTexCoord;
virtual bool using3D () { return false; }
virtual bool requiresTransformedWindow () const { return true; }
virtual void initGrid (); ///< Initializes grid width/height.
///< Default grid size is 2x2.
///< Override for custom grid size.
public:
GridAnim (CompWindow *w,
WindowEvent curWindowEvent,
float duration,
const AnimEffect info,
const CompRect &icon);
~GridAnim ();
void init ();
void updateBB (CompOutput &output);
bool updateBBUsed () { return true; }
void addGeometry (const GLTexture::MatrixList &matrix,
const CompRegion ®ion,
const CompRegion &clip,
unsigned int maxGridWidth,
unsigned int maxGridHeight);
void drawGeometry ();
};
#endif
|